blob: 7621b948d0d2ccd81b46fba9f6eb1609912948f3 [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Interface IDeclHandler
| Apache Lucene.NET 4.8.0-beta00010 Documentation </title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Interface IDeclHandler
| Apache Lucene.NET 4.8.0-beta00010 Documentation ">
<meta name="generator" content="docfx 2.56.0.0">
<link rel="shortcut icon" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/favicon.ico">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.css">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.css">
<link rel="stylesheet" href="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.css">
<meta property="docfx:navrel" content="toc.html">
<meta property="docfx:tocrel" content="benchmark/toc.html">
<meta property="docfx:rel" content="https://lucenenet.apache.org/docs/4.8.0-beta00009/">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">
<img id="logo" class="svg" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/logo/lucene-net-color.png" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search">
<ul class="level0 breadcrumb">
<li>
<a href="https://lucenenet.apache.org/docs/4.8.0-beta00009/">API</a>
<span id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</span>
</li>
</ul>
</div>
</div>
</header>
<div class="container body-content">
<div id="search-results">
<div class="search-list"></div>
<div class="sr-items">
<p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
</div>
<ul id="pagination"></ul>
</div>
</div>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Sax.Ext.IDeclHandler">
<h1 id="Sax_Ext_IDeclHandler" data-uid="Sax.Ext.IDeclHandler" class="text-break">Interface IDeclHandler
</h1>
<div class="markdown level0 summary"><p>SAX2 extension handler for DTD declaration events.</p>
</div>
<div class="markdown level0 conceptual"></div>
<h6><strong>Namespace</strong>: <a class="xref" href="Sax.Ext.html">Sax.Ext</a></h6>
<h6><strong>Assembly</strong>: Lucene.Net.Benchmark.dll</h6>
<h5 id="Sax_Ext_IDeclHandler_syntax">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public interface IDeclHandler</code></pre>
</div>
<h5 id="Sax_Ext_IDeclHandler_remarks"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p><em>This module, both source code and documentation, is in the
Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>
See <a href="http://www.saxproject.org">http://www.saxproject.org</a>
for further information.
<p>
This is an optional extension handler for SAX2 to provide more
complete information about DTD declarations in an XML document.
XML readers are not required to recognize this handler, and it
is not part of core-only SAX2 distributions.
<p>
Note that data-related DTD declarations (unparsed entities and
notations) are already reported through the
<a class="xref" href="Sax.IDTDHandler.html">IDTDHandler</a> interface.
<p>
If you are using the declaration handler together with a lexical
handler, all of the events will occur between the
<a class="xref" href="Sax.Ext.ILexicalHandler.html#Sax_Ext_ILexicalHandler_StartDTD_System_String_System_String_System_String_">StartDTD(String, String, String)</a> and the
<a class="xref" href="Sax.Ext.ILexicalHandler.html#Sax_Ext_ILexicalHandler_EndDTD">EndDTD()</a> events.
<p>
To set the DeclHandler for an XML reader, use the
<a class="xref" href="Sax.IXMLReader.html#Sax_IXMLReader_SetProperty_System_String_System_Object_">SetProperty(String, Object)</a> method
with the property name
<a href="http://xml.org/sax/properties/declaration-handler">http://xml.org/sax/properties/declaration-handler</a>
and an object implementing this interface (or null) as the value.
If the reader does not report declaration events, it will throw a
<a class="xref" href="Sax.SAXNotRecognizedException.html">SAXNotRecognizedException</a>
when you attempt to register the handler.</p>
</div>
<h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_Ext_IDeclHandler_AttributeDecl_System_String_System_String_System_String_System_String_System_String_.md&amp;value=---%0Auid%3A%20Sax.Ext.IDeclHandler.AttributeDecl(System.String%2CSystem.String%2CSystem.String%2CSystem.String%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/Ext/DeclHandler.cs/#L88">View Source</a>
</span>
<a id="Sax_Ext_IDeclHandler_AttributeDecl_" data-uid="Sax.Ext.IDeclHandler.AttributeDecl*"></a>
<h4 id="Sax_Ext_IDeclHandler_AttributeDecl_System_String_System_String_System_String_System_String_System_String_" data-uid="Sax.Ext.IDeclHandler.AttributeDecl(System.String,System.String,System.String,System.String,System.String)">AttributeDecl(String, String, String, String, String)</h4>
<div class="markdown level1 summary"><p>Report an attribute type declaration.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void AttributeDecl(string eName, string aName, string type, string mode, string value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">eName</span></td>
<td><p>The name of the associated element.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">aName</span></td>
<td><p>The name of the attribute.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">type</span></td>
<td><p>A string representing the attribute type.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">mode</span></td>
<td><p>A string representing the attribute defaulting mode
(&quot;#IMPLIED&quot;, &quot;#REQUIRED&quot;, or &quot;#FIXED&quot;) or null if
none of these applies.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">value</span></td>
<td><p>A string representing the attribute&apos;s default value,
or null if there is none.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_IDeclHandler_AttributeDecl_System_String_System_String_System_String_System_String_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Only the effective (first) declaration for an attribute will
be reported.The type will be one of the strings &quot;CDATA&quot;,
&quot;ID&quot;, &quot;IDREF&quot;, &quot;IDREFS&quot;, &quot;NMTOKEN&quot;, &quot;NMTOKENS&quot;, &quot;ENTITY&quot;,
&quot;ENTITIES&quot;, a parenthesized token group with
the separator &quot;|&quot; and all whitespace removed, or the word
&quot;NOTATION&quot; followed by a space followed by a parenthesized
token group with all whitespace removed.
<p>
The value will be the value as reported to applications,
appropriately normalized and with entity and character
references expanded.</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.SAXException.html">SAXException</a></td>
<td><p>The application may raise an exception.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_Ext_IDeclHandler_ElementDecl_System_String_System_String_.md&amp;value=---%0Auid%3A%20Sax.Ext.IDeclHandler.ElementDecl(System.String%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/Ext/DeclHandler.cs/#L61">View Source</a>
</span>
<a id="Sax_Ext_IDeclHandler_ElementDecl_" data-uid="Sax.Ext.IDeclHandler.ElementDecl*"></a>
<h4 id="Sax_Ext_IDeclHandler_ElementDecl_System_String_System_String_" data-uid="Sax.Ext.IDeclHandler.ElementDecl(System.String,System.String)">ElementDecl(String, String)</h4>
<div class="markdown level1 summary"><p>Report an element type declaration.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void ElementDecl(string name, string model)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The element type name.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">model</span></td>
<td><p>The content model as a normalized string.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_IDeclHandler_ElementDecl_System_String_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The content model will consist of the string &quot;EMPTY&quot;, the
string &quot;ANY&quot;, or a parenthesised group, optionally followed
by an occurrence indicator.The model will be normalized so
that all parameter entities are fully resolved and all whitespace
is removed,and will include the enclosing parentheses.Other
normalization (such as removing redundant parentheses or
simplifying occurrence indicators) is at the discretion of the
parser.</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.SAXException.html">SAXException</a></td>
<td><p>The application may raise an exception.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_Ext_IDeclHandler_ExternalEntityDecl_System_String_System_String_System_String_.md&amp;value=---%0Auid%3A%20Sax.Ext.IDeclHandler.ExternalEntityDecl(System.String%2CSystem.String%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/Ext/DeclHandler.cs/#L128">View Source</a>
</span>
<a id="Sax_Ext_IDeclHandler_ExternalEntityDecl_" data-uid="Sax.Ext.IDeclHandler.ExternalEntityDecl*"></a>
<h4 id="Sax_Ext_IDeclHandler_ExternalEntityDecl_System_String_System_String_System_String_" data-uid="Sax.Ext.IDeclHandler.ExternalEntityDecl(System.String,System.String,System.String)">ExternalEntityDecl(String, String, String)</h4>
<div class="markdown level1 summary"><p>Report a parsed external entity declaration.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void ExternalEntityDecl(string name, string publicId, string systemId)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the entity. If it is a parameter
entity, the name will begin with &apos;%&apos;.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">publicId</span></td>
<td><p>The entity&apos;s public identifier, or null if none
was given.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">systemId</span></td>
<td><p>The entity&apos;s system identifier.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_IDeclHandler_ExternalEntityDecl_System_String_System_String_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Only the effective (first) declaration for each entity
will be reported.
<p>
If the system identifier is a URL, the parser must resolve it
fully before passing it to the application.</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.SAXException.html">SAXException</a></td>
<td><p>The application may raise an exception.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_IDeclHandler_ExternalEntityDecl_System_String_System_String_System_String__seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Sax.Ext.IDeclHandler.html#Sax_Ext_IDeclHandler_InternalEntityDecl_System_String_System_String_">InternalEntityDecl(String, String)</a></div>
<div><a class="xref" href="Sax.IDTDHandler.html#Sax_IDTDHandler_UnparsedEntityDecl_System_String_System_String_System_String_System_String_">UnparsedEntityDecl</a>(<span class="xref">System.String</span>, <span class="xref">System.String</span>, <span class="xref">System.String</span>, <span class="xref">System.String</span>)</div>
</div>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_Ext_IDeclHandler_InternalEntityDecl_System_String_System_String_.md&amp;value=---%0Auid%3A%20Sax.Ext.IDeclHandler.InternalEntityDecl(System.String%2CSystem.String)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/NightOwl888/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/Ext/DeclHandler.cs/#L108">View Source</a>
</span>
<a id="Sax_Ext_IDeclHandler_InternalEntityDecl_" data-uid="Sax.Ext.IDeclHandler.InternalEntityDecl*"></a>
<h4 id="Sax_Ext_IDeclHandler_InternalEntityDecl_System_String_System_String_" data-uid="Sax.Ext.IDeclHandler.InternalEntityDecl(System.String,System.String)">InternalEntityDecl(String, String)</h4>
<div class="markdown level1 summary"><p>Report an internal entity declaration.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">void InternalEntityDecl(string name, string value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">name</span></td>
<td><p>The name of the entity. If it is a parameter
entity, the name will begin with &apos;%&apos;.</p>
</td>
</tr>
<tr>
<td><span class="xref">System.String</span></td>
<td><span class="parametername">value</span></td>
<td><p>The replacement text of the entity.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_IDeclHandler_InternalEntityDecl_System_String_System_String__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Only the effective (first) declaration for each entity
will be reported.All parameter entities in the value
will be expanded, but general entities will not.</p>
</div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sax.SAXException.html">SAXException</a></td>
<td><p>The application may raise an exception.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="Sax_Ext_IDeclHandler_InternalEntityDecl_System_String_System_String__seealso">See Also</h5>
<div class="seealso">
<div><a class="xref" href="Sax.Ext.IDeclHandler.html#Sax_Ext_IDeclHandler_ExternalEntityDecl_System_String_System_String_System_String_">ExternalEntityDecl(String, String, String)</a></div>
<div><a class="xref" href="Sax.IDTDHandler.html#Sax_IDTDHandler_UnparsedEntityDecl_System_String_System_String_System_String_System_String_">UnparsedEntityDecl</a>(<span class="xref">System.String</span>, <span class="xref">System.String</span>, <span class="xref">System.String</span>, <span class="xref">System.String</span>)</div>
</div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https://github.com/apache/lucenenet/new/docs/4.8.0-beta00010/websites/apidocs/apiSpec/new?filename=Sax_Ext_IDeclHandler.md&amp;value=---%0Auid%3A%20Sax.Ext.IDeclHandler%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
</li>
<li>
<a href="https://github.com/apache/lucenenet/blob/release/Lucene.Net_4_8_0_beta00010/src/Lucene.Net.Benchmark/Support/Sax/Ext/DeclHandler.cs/#L43" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
Copyright © 2020 Licensed to the Apache Software Foundation (ASF)
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.vendor.js"></script>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/docfx.js"></script>
<script type="text/javascript" src="https://lucenenet.apache.org/docs/4.8.0-beta00009/styles/main.js"></script>
</body>
</html>