Sophie

Sophie

distrib > Mageia > 6 > armv5tl > media > core-updates > by-pkgid > 21683c2052716543063aae9960d9aef7 > files > 581

xerces-c-doc-3.1.4-2.1.mga6.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Xerces-C++: EntityResolver Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Xerces-C++
   &#160;<span id="projectnumber">3.1.4</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classEntityResolver-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">EntityResolver Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
</div><!--header-->
<div class="contents">

<p>Basic interface for resolving entities.  
 <a href="classEntityResolver.html#details">More...</a></p>
<div class="dynheader">
Inheritance diagram for EntityResolver:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classEntityResolver.png" usemap="#EntityResolver_map" alt=""/>
  <map id="EntityResolver_map" name="EntityResolver_map">
<area href="classDefaultHandler.html" title="Default base class for SAX2 handlers. " alt="DefaultHandler" shape="rect" coords="0,56,97,80"/>
<area href="classHandlerBase.html" title="Default base class for handlers. " alt="HandlerBase" shape="rect" coords="107,56,204,80"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">Constructors and Destructor</div></td></tr>
<tr class="memitem:a14e534eb2170015056ccd71458e1058c"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEntityResolver.html#a14e534eb2170015056ccd71458e1058c">EntityResolver</a> ()</td></tr>
<tr class="memdesc:a14e534eb2170015056ccd71458e1058c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default Constructor.  <a href="#a14e534eb2170015056ccd71458e1058c">More...</a><br/></td></tr>
<tr class="separator:a14e534eb2170015056ccd71458e1058c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d5de369cdaff0d67cfaaa63029187aa"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEntityResolver.html#a0d5de369cdaff0d67cfaaa63029187aa">~EntityResolver</a> ()</td></tr>
<tr class="memdesc:a0d5de369cdaff0d67cfaaa63029187aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor.  <a href="#a0d5de369cdaff0d67cfaaa63029187aa">More...</a><br/></td></tr>
<tr class="separator:a0d5de369cdaff0d67cfaaa63029187aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">The EntityResolver interface</div></td></tr>
<tr class="memitem:af6e630429ea35de71acda7287846911e"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classInputSource.html">InputSource</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEntityResolver.html#af6e630429ea35de71acda7287846911e">resolveEntity</a> (const <a class="el" href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *const publicId, const <a class="el" href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *const systemId)=0</td></tr>
<tr class="memdesc:af6e630429ea35de71acda7287846911e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Allow the application to resolve external entities.  <a href="#af6e630429ea35de71acda7287846911e">More...</a><br/></td></tr>
<tr class="separator:af6e630429ea35de71acda7287846911e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Basic interface for resolving entities. </p>
<p>If a SAX application needs to implement customized handling for external entities, it must implement this interface and register an instance with the SAX parser using the parser's setEntityResolver method.</p>
<p>The parser will then allow the application to intercept any external entities (including the external DTD subset and external parameter entities, if any) before including them.</p>
<p>Many SAX applications will not need to implement this interface, but it will be especially useful for applications that build XML documents from databases or other specialised input sources, or for applications that use URI types other than URLs.</p>
<p>The following resolver would provide the application with a special character stream for the entity with the system identifier "http://www.myhost.com/today":</p>
<p><code> #include &lt;<a class="el" href="EntityResolver_8hpp.html">xercesc/sax/EntityResolver.hpp</a>&gt;<br/>
 #include &lt;<a class="el" href="InputSource_8hpp.html">xercesc/sax/InputSource.hpp</a>&gt;<br/>
 <br/>
 class MyResolver : public <a class="el" href="classEntityResolver.html" title="Basic interface for resolving entities. ">EntityResolver</a> {<br/>
 public:<br/>
&#160; <a class="el" href="classInputSource.html" title="A single input source for an XML entity. ">InputSource</a> resolveEntity (const XMLCh* const publicId, const XMLCh* const systemId);<br/>
&#160;&#160; <br/>
 ...<br/>
&#160;&#160; };<br/>
&#160; <br/>
 &#160;MyResolver::resolveEntity {<br/>
 &#160;&#160;if (<a class="el" href="classXMLString.html#a7ac8e671c8b93126d67ded235174e257" title="Lexicographically compares str1 and str2 and returns a value indicating their relationship. ">XMLString::compareString</a>(systemId, "http://www.myhost.com/today")) {<br/>
 &#160;&#160;&#160;MyReader* reader = new MyReader();<br/>
 &#160;&#160;&#160;return new <a class="el" href="classInputSource.html" title="A single input source for an XML entity. ">InputSource(reader)</a>;<br/>
 &#160;&#160;} else {<br/>
 &#160;&#160;&#160;return null;<br/>
 &#160;&#160;}<br/>
 &#160;}<br/>
 <br/>
 </code></p>
<p>The application can also use this interface to redirect system identifiers to local URIs or to look up replacements in a catalog (possibly by using the public identifier).</p>
<p>The <a class="el" href="classHandlerBase.html" title="Default base class for handlers. ">HandlerBase</a> class implements the default behaviour for this interface, which is simply always to return null (to request that the parser use the default system identifier).</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classParser.html#a62435895e0615380f3017090ac232594" title="Allow an application to register a custom entity resolver. ">Parser::setEntityResolver</a> </dd>
<dd>
<a class="el" href="classInputSource.html#a601a7aa7124e2d8e9664eda9aea6b622" title="Default constructor. ">InputSource::InputSource</a> </dd>
<dd>
<a class="el" href="classHandlerBase.html#aa9bbcdb7958bace9296940ab702ef367">HandlerBase::HandlerBase</a> </dd></dl>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a14e534eb2170015056ccd71458e1058c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">EntityResolver::EntityResolver </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Default Constructor. </p>

</div>
</div>
<a class="anchor" id="a0d5de369cdaff0d67cfaaa63029187aa"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual EntityResolver::~EntityResolver </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Destructor. </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="af6e630429ea35de71acda7287846911e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual <a class="el" href="classInputSource.html">InputSource</a>* EntityResolver::resolveEntity </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *const&#160;</td>
          <td class="paramname"><em>publicId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="Xerces__autoconf__config_8borland_8hpp.html#a8cb107980a360c490ad7661f5d27cc0e">XMLCh</a> *const&#160;</td>
          <td class="paramname"><em>systemId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Allow the application to resolve external entities. </p>
<p>The <a class="el" href="classParser.html" title="Basic interface for SAX (Simple API for XML) parsers. ">Parser</a> will call this method before opening any external entity except the top-level document entity (including the external DTD subset, external entities referenced within the DTD, and external entities referenced within the document element): the application may request that the parser resolve the entity itself, that it use an alternative URI, or that it use an entirely different input source.</p>
<p>Application writers can use this method to redirect external system identifiers to secure and/or local URIs, to look up public identifiers in a catalogue, or to read an entity from a database or other input source (including, for example, a dialog box).</p>
<p>If the system identifier is a URL, the SAX parser must resolve it fully before reporting it to the application.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">publicId</td><td>The public identifier of the external entity being referenced, or null if none was supplied. </td></tr>
    <tr><td class="paramname">systemId</td><td>The system identifier of the external entity being referenced. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>An <a class="el" href="classInputSource.html" title="A single input source for an XML entity. ">InputSource</a> object describing the new input source, or null to request that the parser open a regular URI connection to the system identifier. The returned <a class="el" href="classInputSource.html" title="A single input source for an XML entity. ">InputSource</a> is owned by the parser which is responsible to clean up the memory. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname"><a class="el" href="classSAXException.html" title="Encapsulate a general SAX error or warning. ">SAXException</a></td><td>Any SAX exception, possibly wrapping another exception. </td></tr>
    <tr><td class="paramname">IOException</td><td>An IO exception, possibly the result of creating a new InputStream or Reader for the <a class="el" href="classInputSource.html" title="A single input source for an XML entity. ">InputSource</a>. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classInputSource.html#a601a7aa7124e2d8e9664eda9aea6b622" title="Default constructor. ">InputSource::InputSource</a> </dd></dl>

<p>Implemented in <a class="el" href="classDefaultHandler.html#a6890d0f8c734eaca9fbc5da987b2b4d4">DefaultHandler</a>, and <a class="el" href="classHandlerBase.html#ac8887abf3674946a8c02bf6097bffd28">HandlerBase</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="EntityResolver_8hpp_source.html">EntityResolver.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>