<commit_before><?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">

<s1 title="Features">
	<s2 title="Setting Features">
        <anchor name="features"/>
		<p>To set a feature on either org.apache.xerces.parsers.SAXParser or 
		org.apache.xerces.parsers.DOMParser, you should use the SAX2 
		method <code>setFeature(String,boolean)</code>. To query a
		feature, use the SAX2 method <code>getFeature(String)</code>.</p>
		<p>For example, to turn on validation:</p>
<source>SAXParser p=new SAXParser();
try {
  p.setFeature("http://xml.org/sax/features/validation", true);
} catch (SAXException e) {
  System.out.println("error in setting up parser feature");
}</source>
	</s2>
	
	<s2 title="General Features">
		<anchor name="validation"/>
		<p>http://xml.org/sax/features/validation</p>
		<table>
			<tr><th>True:</th>		<td>Validate the document.</td></tr>
			<tr><th>False:</th>		<td>Do not validate the document.</td></tr>
			<tr><th>Default:</th>	<td>false</td></tr>
			<tr><th>Access:</th>	<td>(parsing) read-only; (not parsing) read/write</td></tr>
			<tr><th>Note:</th>		<td>If this feature is set to true, the document must specify a grammar. 
					   				If this feature is set to false, the document may specify a grammar 
					  				and that grammar will be parsed but no validation of the document 
					   				contents will be performed.</td></tr>
			<tr><th>See:</th>		<td><link anchor="dynamic">http://apache.org/xml/features/validation/dynamic</link>
									<br/><link anchor="namespaces">http://xml.org/sax/features/namespaces</link></td></tr>
		</table>
		
		<anchor name="external-general-entities"/>
		<p>http://xml.org/sax/features/external-general-entities</p>
		<table>
			<tr><th>True:</th>		<td>Include external general (text) entities.</td></tr>
			<tr><th>False:</th>		<td>Do not include external general entities.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
			<tr><th>Access:</th>	<td>(parsing) read-only; (not parsing) read/write</td></tr>
			<tr><th>See:</th>
				<td><link anchor="external-parameter-entities">http://xml.org/sax/features/external-parameter-entities</link></td></tr>
		</table>
		
		<anchor name="external-parameter-entities"/>
		<p>http://xml.org/sax/features/external-parameter-entities</p>
		<table>
			<tr><th>True:</th>		<td>Include external parameter entities and the external DTD subset.</td></tr>
			<tr><th>False:</th>		<td>Do not include external parameter entities or the external DTD subset.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
			<tr><th>Access:</th>	<td>(parsing) read-only; (not parsing) read/write</td></tr>
			<tr><th>See:</th>
				<td><link anchor="external-parameter-entities">http://xml.org/sax/features/external-parameter-entities</link></td></tr>
		</table>
		
		<anchor name="namespaces"/>
		<p>http://xml.org/sax/features/namespaces</p>
		<table>
			<tr><th>True:</th>		<td>Perform namespace processing: prefixes will be stripped off element and 
					  				 attribute names and replaced with the corresponding namespace URIs. By 
					  				 default, the two will simply be concatenated, but the namespace-sep core 
					  				 property allows the application to specify a delimiter string for 
					  				 separating the URI part and the local part.</td></tr>
			<tr><th>False:</th>		<td>Do not perform namespace processing.</td></tr>
			<tr><th>Default:</th>	<td>false</td></tr>
			<tr><th>Access:</th>	<td>(parsing) read-only; (not parsing) read/write</td></tr>
			<tr><th>Note:</th>		<td>If the validation feature is set to true, then the document must contain 
   									a grammar that supports the use of namespaces.</td></tr>
			<tr><th>See:</th>		<td><link anchor="validation">http://xml.org/sax/features/validation</link>
									<br/><link idref="properties" anchor="namespace-sep">http://xml.org/sax/properties/namespace-sep</link></td></tr>
		</table>
		
		<anchor name="schema"/>
		<p>http://apache.org/xml/features/validation/schema</p>
		<table>
			<tr><th>True:</th>		<td>Turn on XML Schema support.</td></tr>
			<tr><th>False:</th>		<td>Turn off XML Schema support.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
		</table>

		<anchor name="dynamic"/>
		<p>http://apache.org/xml/features/validation/dynamic</p>
		<table>
			<tr><th>True:</th>		<td>The parser will validate the document only if a grammar is specified.</td></tr>
			<tr><th>False:</th>		<td>Validation is determined by the state of the 
					  					<link anchor="validation">http://xml.org/sax/features/validation</link> feature.</td></tr>
			<tr><th>Default:</th>	<td>false</td></tr>
			<tr><th>See:</th>		<td><link anchor="validation">http://xml.org/sax/features/validation</link></td></tr>
		</table>
		
		<anchor name="warn-on-duplicate-attdef"/>
		<p>http://apache.org/xml/features/validation/warn-on-duplicate-attdef</p>
		<table>
			<tr><th>True:</th><td>Warn on duplicate attribute declaration.</td></tr>
			<tr><th>False:</th><td>Do not warn on duplicate attribute declaration.</td></tr>
			<tr><th>Default:</th><td>true</td></tr>
		</table>
		
		<anchor name="warn-on-undeclared-elemdef"/>
		<p>http://apache.org/xml/features/validation/warn-on-undeclared-elemdef</p>
		<table>
			<tr><th>True:</th>		<td>Warn if element referenced in content model is not declared.</td></tr>
			<tr><th>False:</th>		<td>Do not warn if element referenced in content model is not declared.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
		</table>
		
		<anchor name="allow-java-encodings"/>
		<p>http://apache.org/xml/features/allow-java-encodings</p>
		<table>
			<tr><th>True:</th>		<td>Allow Java encoding names in XMLDecl and TextDecl line.</td></tr>
			<tr><th>False:</th>		<td>Do not allow Java encoding names in XMLDecl and TextDecl line.</td></tr>
			<tr><th>Default:</th>	<td>false</td></tr>
			<tr><th>Note:</th>		<td>A true value for this feature allows the encoding of the file to be 
					 				  specified as a Java encoding name as well as the standard ISO encoding 
					 				  name. Be aware that other parsers may not be able to use Java encoding 
					 				  names. If this feature is set to false, an error will be generated if 
					 				  Java encoding names are used.</td></tr>			
		</table>
		
		<anchor name="continue-after-fatal-error"/>
		<p>http://apache.org/xml/features/continue-after-fatal-error</p>
		<table>
			<tr><th>True:</th><td>Continue after fatal error.</td></tr>
			<tr><th>False:</th><td>Stops parse on first fatal error.</td></tr>
			<tr><th>Default:</th><td>false</td></tr>
		</table>	
	</s2>
	<s2 title="DOM Features">
		<anchor name="defer-node-expansion"/>
		<p>http://apache.org/xml/features/dom/defer-node-expansion</p>
		<table>
			<tr><th>True:</th>		<td>Lazy DOM node expansion.</td></tr>
			<tr><th>False:</th>		<td>Full DOM node expansion.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
			<tr><th>Note:</th>		<td>This feature only applies when the 
					  				 <link idref="properties" anchor="document-class-name">http://apache.org/xml/properties/dom/document-class-name</link> property is
					   				 set to a value other than the name of the default document factory.
					   				 If this feature is set to true, the DOM nodes in the returned 
					   				 document are expanded as the tree is traversed. This feature allows 
					   				 the parser to return a document faster than if the tree is fully 
					   				 expanded during parsing and improves memory usage when the whole 
					   				 tree is not traversed.</td></tr>
			<tr><th>See</th>		<td><link idref="properties" anchor="document-class-name">http://apache.org/xml/properties/dom/document-class-name</link></td></tr>
		</table>	
		
		<anchor name="create-entity-ref-nodes"/>
		<p>http://apache.org/xml/features/dom/create-entity-ref-nodes</p>
		<table>
			<tr><th>True:</th>		<td>Create EntityReference nodes in the DOM tree.</td></tr>
			<tr><th>False:</th>		<td>Do not create EntityReference nodes in the DOM tree.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
			<tr><th>Note:</th>		<td>This feature only affects the appearance of EntityReference nodes in 
					 				  the DOM tree. The document will always contain the entity reference 
					  				 child nodes.</td></tr>
		</table>	
		
		<anchor name="include-ignorable-whitespace"/>
		<p>http://apache.org/xml/features/dom/include-ignorable-whitespace</p>
		<table>
			<tr><th>True:</th>		<td>Includes text nodes that can be 
										considered "ignorable whitespace" in the DOM tree.</td></tr>
			<tr><th>False:</th>		<td>Does not include ignorable whitespace in the DOM tree.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
			<tr><th>Note:</th>		<td>The only way that the parser can determine if text is ignorable is 
									   by reading the associated grammar and having a content model for 
									   the document. When ignorable whitespace text nodes are included in
									   the DOM tree, they will be flagged as ignorable. The ignorable flag 
									   can be queried by calling the TextImpl#isIgnorableWhitespace():boolean 
									   method.</td></tr>
		</table>	
		
		<anchor name="grammar-access"/><commit_msg>add more description to feature " create-entity-ref-nodes" --ericye<commit_after><?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "./dtd/document.dtd">

<s1 title="Features">
	<s2 title="Setting Features">
        <anchor name="features"/>
		<p>To set a feature on either org.apache.xerces.parsers.SAXParser or 
		org.apache.xerces.parsers.DOMParser, you should use the SAX2 
		method <code>setFeature(String,boolean)</code>. To query a
		feature, use the SAX2 method <code>getFeature(String)</code>.</p>
		<p>For example, to turn on validation:</p>
<source>SAXParser p=new SAXParser();
try {
  p.setFeature("http://xml.org/sax/features/validation", true);
} catch (SAXException e) {
  System.out.println("error in setting up parser feature");
}</source>
	</s2>
	
	<s2 title="General Features">
		<anchor name="validation"/>
		<p>http://xml.org/sax/features/validation</p>
		<table>
			<tr><th>True:</th>		<td>Validate the document.</td></tr>
			<tr><th>False:</th>		<td>Do not validate the document.</td></tr>
			<tr><th>Default:</th>	<td>false</td></tr>
			<tr><th>Access:</th>	<td>(parsing) read-only; (not parsing) read/write</td></tr>
			<tr><th>Note:</th>		<td>If this feature is set to true, the document must specify a grammar. 
					   				If this feature is set to false, the document may specify a grammar 
					  				and that grammar will be parsed but no validation of the document 
					   				contents will be performed.</td></tr>
			<tr><th>See:</th>		<td><link anchor="dynamic">http://apache.org/xml/features/validation/dynamic</link>
									<br/><link anchor="namespaces">http://xml.org/sax/features/namespaces</link></td></tr>
		</table>
		
		<anchor name="external-general-entities"/>
		<p>http://xml.org/sax/features/external-general-entities</p>
		<table>
			<tr><th>True:</th>		<td>Include external general (text) entities.</td></tr>
			<tr><th>False:</th>		<td>Do not include external general entities.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
			<tr><th>Access:</th>	<td>(parsing) read-only; (not parsing) read/write</td></tr>
			<tr><th>See:</th>
				<td><link anchor="external-parameter-entities">http://xml.org/sax/features/external-parameter-entities</link></td></tr>
		</table>
		
		<anchor name="external-parameter-entities"/>
		<p>http://xml.org/sax/features/external-parameter-entities</p>
		<table>
			<tr><th>True:</th>		<td>Include external parameter entities and the external DTD subset.</td></tr>
			<tr><th>False:</th>		<td>Do not include external parameter entities or the external DTD subset.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
			<tr><th>Access:</th>	<td>(parsing) read-only; (not parsing) read/write</td></tr>
			<tr><th>See:</th>
				<td><link anchor="external-parameter-entities">http://xml.org/sax/features/external-parameter-entities</link></td></tr>
		</table>
		
		<anchor name="namespaces"/>
		<p>http://xml.org/sax/features/namespaces</p>
		<table>
			<tr><th>True:</th>		<td>Perform namespace processing: prefixes will be stripped off element and 
					  				 attribute names and replaced with the corresponding namespace URIs. By 
					  				 default, the two will simply be concatenated, but the namespace-sep core 
					  				 property allows the application to specify a delimiter string for 
					  				 separating the URI part and the local part.</td></tr>
			<tr><th>False:</th>		<td>Do not perform namespace processing.</td></tr>
			<tr><th>Default:</th>	<td>false</td></tr>
			<tr><th>Access:</th>	<td>(parsing) read-only; (not parsing) read/write</td></tr>
			<tr><th>Note:</th>		<td>If the validation feature is set to true, then the document must contain 
   									a grammar that supports the use of namespaces.</td></tr>
			<tr><th>See:</th>		<td><link anchor="validation">http://xml.org/sax/features/validation</link>
									<br/><link idref="properties" anchor="namespace-sep">http://xml.org/sax/properties/namespace-sep</link></td></tr>
		</table>
		
		<anchor name="schema"/>
		<p>http://apache.org/xml/features/validation/schema</p>
		<table>
			<tr><th>True:</th>		<td>Turn on XML Schema support.</td></tr>
			<tr><th>False:</th>		<td>Turn off XML Schema support.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
		</table>

		<anchor name="dynamic"/>
		<p>http://apache.org/xml/features/validation/dynamic</p>
		<table>
			<tr><th>True:</th>		<td>The parser will validate the document only if a grammar is specified.</td></tr>
			<tr><th>False:</th>		<td>Validation is determined by the state of the 
					  					<link anchor="validation">http://xml.org/sax/features/validation</link> feature.</td></tr>
			<tr><th>Default:</th>	<td>false</td></tr>
			<tr><th>See:</th>		<td><link anchor="validation">http://xml.org/sax/features/validation</link></td></tr>
		</table>
		
		<anchor name="warn-on-duplicate-attdef"/>
		<p>http://apache.org/xml/features/validation/warn-on-duplicate-attdef</p>
		<table>
			<tr><th>True:</th><td>Warn on duplicate attribute declaration.</td></tr>
			<tr><th>False:</th><td>Do not warn on duplicate attribute declaration.</td></tr>
			<tr><th>Default:</th><td>true</td></tr>
		</table>
		
		<anchor name="warn-on-undeclared-elemdef"/>
		<p>http://apache.org/xml/features/validation/warn-on-undeclared-elemdef</p>
		<table>
			<tr><th>True:</th>		<td>Warn if element referenced in content model is not declared.</td></tr>
			<tr><th>False:</th>		<td>Do not warn if element referenced in content model is not declared.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
		</table>
		
		<anchor name="allow-java-encodings"/>
		<p>http://apache.org/xml/features/allow-java-encodings</p>
		<table>
			<tr><th>True:</th>		<td>Allow Java encoding names in XMLDecl and TextDecl line.</td></tr>
			<tr><th>False:</th>		<td>Do not allow Java encoding names in XMLDecl and TextDecl line.</td></tr>
			<tr><th>Default:</th>	<td>false</td></tr>
			<tr><th>Note:</th>		<td>A true value for this feature allows the encoding of the file to be 
					 				  specified as a Java encoding name as well as the standard ISO encoding 
					 				  name. Be aware that other parsers may not be able to use Java encoding 
					 				  names. If this feature is set to false, an error will be generated if 
					 				  Java encoding names are used.</td></tr>			
		</table>
		
		<anchor name="continue-after-fatal-error"/>
		<p>http://apache.org/xml/features/continue-after-fatal-error</p>
		<table>
			<tr><th>True:</th><td>Continue after fatal error.</td></tr>
			<tr><th>False:</th><td>Stops parse on first fatal error.</td></tr>
			<tr><th>Default:</th><td>false</td></tr>
		</table>	
	</s2>
	<s2 title="DOM Features">
		<anchor name="defer-node-expansion"/>
		<p>http://apache.org/xml/features/dom/defer-node-expansion</p>
		<table>
			<tr><th>True:</th>		<td>Lazy DOM node expansion.</td></tr>
			<tr><th>False:</th>		<td>Full DOM node expansion.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
			<tr><th>Note:</th>		<td>This feature only applies when the 
					  				 <link idref="properties" anchor="document-class-name">http://apache.org/xml/properties/dom/document-class-name</link> property is
					   				 set to a value other than the name of the default document factory.
					   				 If this feature is set to true, the DOM nodes in the returned 
					   				 document are expanded as the tree is traversed. This feature allows 
					   				 the parser to return a document faster than if the tree is fully 
					   				 expanded during parsing and improves memory usage when the whole 
					   				 tree is not traversed.</td></tr>
			<tr><th>See</th>		<td><link idref="properties" anchor="document-class-name">http://apache.org/xml/properties/dom/document-class-name</link></td></tr>
		</table>	
		
		<anchor name="create-entity-ref-nodes"/>
		<p>http://apache.org/xml/features/dom/create-entity-ref-nodes</p>
		<table>
			<tr><th>True:</th>		<td>Create EntityReference nodes in the DOM tree. The EntityReference nodes and their child nodes will be read-only.</td></tr>
			<tr><th>False:</th>		<td>Do not create EntityReference nodes in the DOM tree. No EntityReference nodes will be created, only the nodes corresponding to their fully expanded sustitution text will be created.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
			<tr><th>Note:</th>		<td>This feature only affects the appearance of EntityReference nodes in 
					 				  the DOM tree. The document will always contain the entity reference 
					  				 child nodes.</td></tr>
		</table>	
		
		<anchor name="include-ignorable-whitespace"/>
		<p>http://apache.org/xml/features/dom/include-ignorable-whitespace</p>
		<table>
			<tr><th>True:</th>		<td>Includes text nodes that can be 
										considered "ignorable whitespace" in the DOM tree.</td></tr>
			<tr><th>False:</th>		<td>Does not include ignorable whitespace in the DOM tree.</td></tr>
			<tr><th>Default:</th>	<td>true</td></tr>
			<tr><th>Note:</th>		<td>The only way that the parser can determine if text is ignorable is 
									   by reading the associated grammar and having a content model for 
									   the document. When ignorable whitespace text nodes are included in
									   the DOM tree, they will be flagged as ignorable. The ignorable flag 
									   can be queried by calling the TextImpl#isIgnorableWhitespace():boolean 
									   method.</td></tr>
		</table>	
		
		<anchor name="grammar-access"/>
{'fraction_non_alphanumeric': 0.17715178282882688, 'fraction_numerical': 0.0011849617580523537, 'mean_word_length': 3.534065934065934, 'pattern_counts': {'":': 0, '<': 877, '<?xml version=': 2, '>': 877, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 50}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1255935', 'n_tokens_mistral': 7097, 'n_tokens_neox': 6138, 'n_words': 1528}