<HTML ><HEAD ><TITLE >xml_set_unparsed_entity_decl_handler</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="PHP Manual" HREF="index.html"><LINK REL="UP" TITLE="XML parser functions" HREF="ref.xml.html"><LINK REL="PREVIOUS" TITLE="xml_set_start_namespace_decl_handler" HREF="function.xml-set-start-namespace-decl-handler.html"><LINK REL="NEXT" TITLE="XML-RPC functions" HREF="ref.xmlrpc.html"><META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=ISO-8859-1"></HEAD ><BODY CLASS="refentry" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >PHP Manual</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="function.xml-set-start-namespace-decl-handler.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="ref.xmlrpc.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><H1 ><A NAME="function.xml-set-unparsed-entity-decl-handler" ></A >xml_set_unparsed_entity_decl_handler</H1 ><DIV CLASS="refnamediv" ><A NAME="AEN96663" ></A ><P > (PHP 3>= 3.0.6, PHP 4 )</P >xml_set_unparsed_entity_decl_handler -- Set up unparsed entity declaration handler </DIV ><DIV CLASS="refsect1" ><A NAME="AEN96666" ></A ><H2 >Description</H2 >bool <B CLASS="methodname" >xml_set_unparsed_entity_decl_handler</B > ( resource parser, string handler)<BR ></BR ><P > Sets the unparsed entity declaration handler function for the XML parser <TT CLASS="parameter" ><I >parser</I ></TT >. <TT CLASS="parameter" ><I >handler</I ></TT > is a string containing the name of a function that must exist when <A HREF="function.xml-parse.html" ><B CLASS="function" >xml_parse()</B ></A > is called for <TT CLASS="parameter" ><I >parser</I ></TT >. </P ><P > This handler will be called if the XML parser encounters an external entity declaration with an NDATA declaration, like the following: <TABLE BORDER="0" BGCOLOR="#E0E0E0" CELLPADDING="5" ><TR ><TD ><PRE CLASS="xml" ><!ENTITY <TT CLASS="parameter" ><I >name</I ></TT > {<TT CLASS="parameter" ><I >publicId</I ></TT > | <TT CLASS="parameter" ><I >systemId</I ></TT >} NDATA <TT CLASS="parameter" ><I >notationName</I ></TT >></PRE ></TD ></TR ></TABLE > </P ><P > See <A HREF="http://www.w3.org/TR/1998/REC-xml-19980210#sec-external-ent" TARGET="_top" >section 4.2.2 of the XML 1.0 spec</A > for the definition of notation declared external entities. </P ><P > The function named by <TT CLASS="parameter" ><I >handler</I ></TT > must accept six parameters: <B CLASS="methodname" ><TT CLASS="replaceable" ><I >handler</I ></TT ></B > ( resource parser, string entity_name, string base, string system_id, string public_id, string notation_name)<BR ></BR > <P ></P ><DIV CLASS="variablelist" ><DL ><DT ><TT CLASS="parameter" ><I >parser</I ></TT ></DT ><DD ><P > The first parameter, <TT CLASS="replaceable" ><I >parser</I ></TT >, is a reference to the XML parser calling the handler. </P ></DD ><DT ><TT CLASS="parameter" ><I >entity_name</I ></TT ></DT ><DD ><P > The name of the entity that is about to be defined. </P ></DD ><DT ><TT CLASS="parameter" ><I >base</I ></TT ></DT ><DD ><P > This is the base for resolving the system identifier (<TT CLASS="parameter" ><I >systemId</I ></TT >) of the external entity. Currently this parameter will always be set to an empty string. </P ></DD ><DT ><TT CLASS="parameter" ><I >system_id</I ></TT ></DT ><DD ><P > System identifier for the external entity. </P ></DD ><DT ><TT CLASS="parameter" ><I >public_id</I ></TT ></DT ><DD ><P > Public identifier for the external entity. </P ></DD ><DT ><TT CLASS="parameter" ><I >notation_name</I ></TT ></DT ><DD ><P > Name of the notation of this entity (see <A HREF="function.xml-set-notation-decl-handler.html" ><B CLASS="function" >xml_set_notation_decl_handler()</B ></A >). </P ></DD ></DL ></DIV ></P ><P > If a handler function is set to an empty string, or <TT CLASS="constant" ><B >FALSE</B ></TT >, the handler in question is disabled. </P ><P > <TT CLASS="constant" ><B >TRUE</B ></TT > is returned if the handler is set up, <TT CLASS="constant" ><B >FALSE</B ></TT > if <TT CLASS="parameter" ><I >parser</I ></TT > is not a parser. </P ><DIV CLASS="note" ><BLOCKQUOTE CLASS="note" ><P ><B >Note: </B >Instead of a function name, an array containing an object reference and a method name can also be supplied.</P ></BLOCKQUOTE ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="function.xml-set-start-namespace-decl-handler.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="ref.xmlrpc.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >xml_set_start_namespace_decl_handler</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="ref.xml.html" ACCESSKEY="U" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >XML-RPC functions</TD ></TR ></TABLE ></DIV ></BODY ></HTML >