CVS update: php3/doc/functions

From: Date: Wed, 28 Oct 1998 03:35:53 +0000
Subject: CVS update: php3/doc/functions
Groups: php.dev 
Request: Send a blank email to php-dev+get-2055@lists.php.net to get a copy of this message
Date: Tuesday October 27, 1998 @ 22:35 Author: ssb Update of /repository/php3/doc/functions In directory asf:/u2/tmp/cvs-serv14955/doc/functions Modified Files: xml.sgml Log Message: Unicode support (still no UTF-16, of course) Index: php3/doc/functions/xml.sgml diff -c php3/doc/functions/xml.sgml:1.13 php3/doc/functions/xml.sgml:1.14 *** php3/doc/functions/xml.sgml:1.13 Tue Oct 27 18:02:41 1998 --- php3/doc/functions/xml.sgml Tue Oct 27 22:35:52 1998 *************** *** 41,47 **** somewhere exotic. </para> <para> ! Build PHP. Tada! That should be it. </para> </sect2> <sect2 id="xml.about"> --- 41,47 ---- somewhere exotic. </para> <para> ! Build PHP. <emphasis>Tada!</emphasis> That should be it. </para> </sect2> <sect2 id="xml.about"> *************** *** 49,69 **** <para> This PHP extension implements support for James Clark's <productname>expat</productname> in PHP. This toolkit lets you ! parse, but not validate, XML documents. Although ! <productname>expat</productname> features full ! <acronym>UNICODE</acronym> character set support, this extension ! currently uses single-byte characters. </para> <para> - The function names, parameters and constant names in this - extension are as much as possible based on the names used in - <productname>expat</productname>. - </para> - <para> This extension lets you <link linkend="function.xml-parser-create">create XML parsers</link> and then define <emphasis>handlers</emphasis> for different XML ! events. Each parser also has a few parameters you can adjust. </para> <para> The XML event handlers defined are: --- 49,67 ---- <para> This PHP extension implements support for James Clark's <productname>expat</productname> in PHP. This toolkit lets you ! parse, but not validate, XML documents. It supports three ! source <link linkend="xml.encoding">character encodings</link> ! also provided by PHP: <literal>US-ASCII</literal>, ! <literal>ISO-8859-1</literal> and <literal>UTF-8</literal>. ! <literal>UTF-16</literal> is not supported. </para> <para> This extension lets you <link linkend="function.xml-parser-create">create XML parsers</link> and then define <emphasis>handlers</emphasis> for different XML ! events. Each XML parser also has a few <link ! linkend="function.xml-parser-set-option">parameters</link> you ! can adjust. </para> <para> The XML event handlers defined are: *************** *** 155,161 **** <para> By default, all the element names that are passed to the handler functions are case-folded. This behaviour can be queried and ! controlled per parser with the <function>xml_parser_get_option</function> and <function>xml_parser_set_option</function> functions, respectively. --- 153,159 ---- <para> By default, all the element names that are passed to the handler functions are case-folded. This behaviour can be queried and ! controlled per XML parser with the <function>xml_parser_get_option</function> and <function>xml_parser_set_option</function> functions, respectively. *************** *** 194,217 **** </sect2> <sect2 id="xml.encoding"> <title>Character Encoding</title> <para> ! Each XML parser can be created for a given <glossterm>character ! encoding</glossterm>. Currently, the supported encodings are ! ISO-8859-1, US-ASCII and UTF-8. The former two are single-byte encodings, which means that each character is represented by a ! single byte. UTF-8 can encode characters composed by a ! variable number of bits (max 21) in one to four bytes. The ! default encoding used by PHP is ISO-8859-1. ! <note> ! <para> ! The character encoding given to ! <function>xml_parser_create</function> is only used on the ! parsed XML documents. All string passed to handler functions ! has been decoded to single bytes, and characters with values ! that can not be represented by a singly byte have been ! replaced by question marks. ! </para> ! </note> </sect2> </sect1> <sect1 id="xml.examples"> --- 192,239 ---- </sect2> <sect2 id="xml.encoding"> <title>Character Encoding</title> + <para> + PHP's XML extension supports the <ulink + url="&url.unicode;">Unicode</ulink> character set through + different <glossterm>character encoding</glossterm>s. There + are two types of character encodings, <glossterm>source + encoding</glossterm> and <glossterm>target + encoding</glossterm>. PHP's internal representation of the + document is always encoded with <literal>UTF-8</literal>. + </para> <para> ! Source encoding is done when an XML document is <link ! linkend="function.xml-parse">parsed</link>. Upon <link ! linkend="function.xml-parser-create">creating an XML ! parser</link>, a source encoding can be specified (this ! encoding can not be changed later in the XML parser's ! lifetime). The supported source encodings are ! <literal>ISO-8859-1</literal>, <literal>US-ASCII</literal> and ! <literal>UTF-8</literal>. The former two are single-byte encodings, which means that each character is represented by a ! single byte. <literal>UTF-8</literal> can encode characters ! composed by a variable number of bits (up to 21) in one to four ! bytes. The default source encoding used by PHP is ! <literal>ISO-8859-1</literal>. ! </para> ! <para> ! Target encoding is done when PHP passes data to XML handler ! functions. When an XML parser is created, the target encoding ! is set to the same as the source encoding, but this may be ! changed at any point. The target encoding will affect character ! data as well as tag names and processing instruction targets. ! </para> ! <para> ! If the XML parser encounters characters outside the range that ! its source encoding is capable of representing, it will return ! an error. ! </para> ! <para> ! If PHP encounters characters in the parsed XML document that can ! not be represented in the chosen target encoding, the problem ! characters will be "demoted". Currently, this means that such ! characters are replaced by a question mark. ! </para> </sect2> </sect1> <sect1 id="xml.examples"> *************** *** 545,552 **** </listitem> </varlistentry> </variablelist> ! Creates an XML parser and returns a handle for use by other XML ! functions. Returns <literal>false</literal> on failure. </para> </refsect1> </refentry> --- 567,575 ---- </listitem> </varlistentry> </variablelist> ! This function creates an XML parser and returns a handle for use ! by other XML functions. Returns <literal>false</literal> on ! failure. </para> </refsect1> </refentry> *************** *** 1268,1274 **** <entry>integer</entry> <entry>Controls whether <link linkend="xml.case-folding">case-folding</link> is enabled for ! this parser. Enabled by default.</entry> </row> </tbody> </tgroup> --- 1291,1308 ---- <entry>integer</entry> <entry>Controls whether <link linkend="xml.case-folding">case-folding</link> is enabled for ! this XML parser. Enabled by default.</entry> ! </row> ! <row> ! <entry>XML_OPTION_TARGET_ENCODING</entry> ! <entry>string</entry> <entry>Sets which <link ! linkend="xml.encoding">target encoding</link> to use in this ! XML parser. By default, it is set to the same as the source ! encoding used by <function>xml_parser_create</function>. ! Supported target encodings are ! <literal>ISO-8859-1</literal>, <literal>US-ASCII</literal> ! and <literal>UTF-8</literal>. ! </entry> </row> </tbody> </tgroup> -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#2055) next »