downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.xml-set-notation-decl-handler.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once
dirname(__FILE__) ."/toc/ref.xml.inc";
$setup = array (
 
'home' =>
  array (
   
0 => 'index.php',
   
1 => 'PHP Manual',
  ),
 
'head' =>
  array (
   
0 => 'UTF-8',
   
1 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.xml-set-notation-decl-handler.php',
   
1 => 'xml_set_notation_decl_handler',
  ),
 
'up' =>
  array (
   
0 => 'ref.xml.php',
   
1 => 'XML Parser Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.xml-set-external-entity-ref-handler.php',
   
1 => 'xml_set_external_entity_ref_handler',
  ),
 
'next' =>
  array (
   
0 => 'function.xml-set-object.php',
   
1 => 'xml_set_object',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.xml-set-notation-decl-handler" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">xml_set_notation_decl_handler</h1>
  <p class="verinfo">(PHP 4, PHP 5)</p><p class="refpurpose"><span class="refname">xml_set_notation_decl_handler</span> &mdash; <span class="dc-title">Set up notation declaration handler</span></p>

 </div>
 
 <a name="function.xml-set-notation-decl-handler.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><b>xml_set_notation_decl_handler</b></span>
    ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$parser</tt></span>
   , <span class="methodparam"><span class="type"><a href="language.pseudo-types.php#language.types.callback" class="type callback">callback</a></span> <tt class="parameter">$handler</tt></span>
   )</div>

  <p class="para rdfs-comment">
   Sets the notation declaration handler function for the XML parser
   <i><tt class="parameter">parser</tt></i>
.
  </p>
  <p class="para">
   A notation declaration is part of the document&#039;s DTD and has the
   following format:   
   </p><div class="example-contents programlisting">
<div class="xmlcode"><pre class="xmlcode">&lt;!NOTATION &lt;parameter&gt;name&lt;/parameter&gt;
{ &lt;parameter&gt;systemId&lt;/parameter&gt; | &lt;parameter&gt;publicId&lt;/parameter&gt;?&gt;</pre>
</div>
   </div>
<p>
   See <a href="http://www.w3.org/TR/1998/REC-xml-19980210#Notations" class="link external">&raquo; section 4.7 of the XML 1.0
   spec</a> for the definition of notation declarations.
  </p>
 </div>


 <a name="function.xml-set-notation-decl-handler.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">parser</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">handler</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       <i><tt class="parameter">handler</tt></i>
 is a string containing the name of a
       function that must exist when <a href="function.xml-parse.php" class="function">xml_parse()</a> is called
       for <i><tt class="parameter">parser</tt></i>
.
      </p>
      <p class="para">
       The function named by <i><tt class="parameter">handler</tt></i>
 must accept
       five parameters:
       <div class="methodsynopsis dc-description">
         <span class="methodname"><span class="replaceable">handler</span></span>
         ( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$parser</tt></span>
        , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$notation_name</tt></span>
        , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$base</tt></span>
        , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$system_id</tt></span>
        , <span class="methodparam"><span class="type">string</span> <tt class="parameter">$public_id</tt></span>
        )</div>

       </p><dl>

        <dt class="varlistentry">

         <span class="term">
          <i><tt class="parameter">parser</tt></i>

         </span>
 
         </dt><dd class="listitem">

          <span class="simpara">
           The first parameter, <span class="replaceable">parser</span>, is a
           reference to the XML parser calling the handler.
          </span>
         </dd>

       
        <dt class="varlistentry">

         <span class="term"><i><tt class="parameter">notation_name</tt></i>
</span>

         </dt><dd class="listitem">

          <span class="simpara">
           This is the notation&#039;s <i><tt class="parameter">name</tt></i>
, as per
           the notation format described above.
          </span>
         </dd>

       
        <dt class="varlistentry">

         <span class="term">
          <i><tt class="parameter">base</tt></i>

         </span>

         </dt><dd class="listitem">

          <span class="simpara">
           This is the base for resolving the system identifier
           (<i><tt class="parameter">system_id</tt></i>
) of the notation declaration.
           Currently this parameter will always be set to an empty string.
          </span>
         </dd>

       
        <dt class="varlistentry">

         <span class="term"><i><tt class="parameter">system_id</tt></i>
</span>

         </dt><dd class="listitem">

          <span class="simpara">
           System identifier of the external notation declaration.
          </span>
         </dd>

       
        <dt class="varlistentry">

         <span class="term">
          <i><tt class="parameter">public_id</tt></i>

         </span>

         </dt><dd class="listitem">

          <span class="simpara">
           Public identifier of the external notation declaration.
          </span>
         </dd>

       
       </dl>
<p>
      </p>
      <p class="para">
       If a handler function is set to an empty string, or <b><tt class="constant">FALSE</tt></b>, the handler
       in question is disabled.
      </p>
      <blockquote><p><b class="note">Note</b>: <span class="simpara">Instead of a function name, an
array containing an object reference and a method name can also be
supplied.</span></p></blockquote>
     </dd>

   
   </dl>
<p>
  </p>
 </div>


 <a name="function.xml-set-notation-decl-handler.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns <b><tt class="constant">TRUE</tt></b> on success or <b><tt class="constant">FALSE</tt></b> on failure.
  </p>
 </div>


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites