diff --git a/reference/xml/functions/utf8-decode.xml b/reference/xml/functions/utf8-decode.xml index 2ce234a30a..d7e04f84a1 100644 --- a/reference/xml/functions/utf8-decode.xml +++ b/reference/xml/functions/utf8-decode.xml @@ -1,5 +1,5 @@ - + @@ -11,10 +11,10 @@ Description - - stringutf8_decode - stringdata - + + stringutf8_decode + stringdata + This function decodes data, assumed to be UTF-8 encoded, to ISO-8859-1. diff --git a/reference/xml/functions/utf8-encode.xml b/reference/xml/functions/utf8-encode.xml index ba937ee6c7..9fbcfa0784 100644 --- a/reference/xml/functions/utf8-encode.xml +++ b/reference/xml/functions/utf8-encode.xml @@ -1,5 +1,5 @@ - + @@ -8,54 +8,52 @@ Description - - stringutf8_encode - stringdata - + + stringutf8_encode + stringdata + This function encodes the string data to UTF-8, and returns the encoded version. UTF-8 is a standard mechanism used by Unicodefor encoding wide character values into a byte stream. - UTF-8 is transparent to plain - ASCII characters, is self-synchronized (meaning - it is possible for a program to figure out where in the - bytestream characters start) and can be used with normal string - comparison functions for sorting and such. PHP encodes - UTF-8 characters in up to four bytes, like - this: + UTF-8 is transparent to plain ASCII + characters, is self-synchronized (meaning it is possible for a program to + figure out where in the bytestream characters start) and can be used with + normal string comparison functions for sorting and such. PHP encodes + UTF-8 characters in up to four bytes, like this: UTF-8 encoding - - bytes - bits - representation - + + bytes + bits + representation + - - 1 - 7 - 0bbbbbbb - - - 2 - 11 - 110bbbbb 10bbbbbb - - - 3 - 16 - 1110bbbb 10bbbbbb 10bbbbbb - - - 4 - 21 - 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb - + + 1 + 7 + 0bbbbbbb + + + 2 + 11 + 110bbbbb 10bbbbbb + + + 3 + 16 + 1110bbbb 10bbbbbb 10bbbbbb + + + 4 + 21 + 11110bbb 10bbbbbb 10bbbbbb 10bbbbbb +
diff --git a/reference/xml/functions/xml-error-string.xml b/reference/xml/functions/xml-error-string.xml index c9fdbb4bc1..a75aef5ad3 100644 --- a/reference/xml/functions/xml-error-string.xml +++ b/reference/xml/functions/xml-error-string.xml @@ -1,5 +1,5 @@ - + @@ -8,18 +8,18 @@ Description - - stringxml_error_string - intcode - + + stringxml_error_string + intcode + code - - An error code from xml_get_error_code. - + + An error code from xml_get_error_code. + diff --git a/reference/xml/functions/xml-get-current-byte-index.xml b/reference/xml/functions/xml-get-current-byte-index.xml index c5c243860c..5c97ffd897 100644 --- a/reference/xml/functions/xml-get-current-byte-index.xml +++ b/reference/xml/functions/xml-get-current-byte-index.xml @@ -1,5 +1,5 @@ - + @@ -8,18 +8,18 @@ Description - - intxml_get_current_byte_index - intparser - + + intxml_get_current_byte_index + resourceparser + parser - - A reference to the XML parser to get byte index from. - + + A reference to the XML parser to get byte index from. + diff --git a/reference/xml/functions/xml-get-current-column-number.xml b/reference/xml/functions/xml-get-current-column-number.xml index 71e97e7a4f..e6495535b2 100644 --- a/reference/xml/functions/xml-get-current-column-number.xml +++ b/reference/xml/functions/xml-get-current-column-number.xml @@ -1,5 +1,5 @@ - + @@ -10,18 +10,18 @@ Description - - intxml_get_current_column_number - intparser - + + intxml_get_current_column_number + resourceparser + parser - - A reference to the XML parser to get column number from. - + + A reference to the XML parser to get column number from. + diff --git a/reference/xml/functions/xml-get-current-line-number.xml b/reference/xml/functions/xml-get-current-line-number.xml index 95eb3d96c5..30120646fc 100644 --- a/reference/xml/functions/xml-get-current-line-number.xml +++ b/reference/xml/functions/xml-get-current-line-number.xml @@ -1,5 +1,5 @@ - + @@ -8,18 +8,18 @@ Description - - intxml_get_current_line_number - intparser - + + intxml_get_current_line_number + resourceparser + parser - - A reference to the XML parser to get line number from. - + + A reference to the XML parser to get line number from. + diff --git a/reference/xml/functions/xml-get-error-code.xml b/reference/xml/functions/xml-get-error-code.xml index 5d4bab85b2..d14d714896 100644 --- a/reference/xml/functions/xml-get-error-code.xml +++ b/reference/xml/functions/xml-get-error-code.xml @@ -1,5 +1,5 @@ - + @@ -8,18 +8,18 @@ Description - - intxml_get_error_code - intparser - + + intxml_get_error_code + resourceparser + parser - - A reference to the XML parser to get error code from. - + + A reference to the XML parser to get error code from. + diff --git a/reference/xml/functions/xml-parse-into-struct.xml b/reference/xml/functions/xml-parse-into-struct.xml index 55aed54f1c..d97f2b74aa 100644 --- a/reference/xml/functions/xml-parse-into-struct.xml +++ b/reference/xml/functions/xml-parse-into-struct.xml @@ -1,5 +1,5 @@ - + @@ -8,13 +8,13 @@ Description - - intxml_parse_into_struct - intparser - stringdata - array&values - array&index - + + intxml_parse_into_struct + resourceparser + stringdata + array&values + array&index + This function parses an XML file into 2 parallel array structures, one (index) containing pointers @@ -125,9 +125,9 @@ Array ]]> - And some code to parse the document and generate the appropriate - objects: - + And some code to parse the document and generate the appropriate + objects: + parsemoldb.php - parses moldb.xml into and array of molecular objects @@ -188,13 +188,13 @@ print_r($db); ?> ]]> </programlisting> - </example> - After executing <filename>parsemoldb.php</filename>, the variable - <varname>$db</varname> contains an array of - <classname>AminoAcid</classname> objects, and the output of the - script confirms that: - <informalexample> - <screen> + </example> + After executing <filename>parsemoldb.php</filename>, the variable + <varname>$db</varname> contains an array of + <classname>AminoAcid</classname> objects, and the output of the + script confirms that: + <informalexample> + <screen> <![CDATA[ ** Database of AminoAcid objects: Array @@ -217,8 +217,8 @@ Array ) ]]> - </screen> - </informalexample> + </screen> + </informalexample> </para> </refsect1> </refentry> diff --git a/reference/xml/functions/xml-parse.xml b/reference/xml/functions/xml-parse.xml index 5fd46eb6b1..bedf25e0be 100644 --- a/reference/xml/functions/xml-parse.xml +++ b/reference/xml/functions/xml-parse.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.2 $ --> +<!-- $Revision: 1.3 $ --> <!-- splitted from ./en/functions/xml.xml, last change in rev 1.2 --> <refentry id="function.xml-parse"> <refnamediv> @@ -8,40 +8,40 @@ </refnamediv> <refsect1> <title>Description - - intxml_parse - intparser - stringdata - intisFinal - + + boolxml_parse + resourceparser + stringdata + boolis_final + parser - - A reference to the XML parser to use. - + + A reference to the XML parser to use. + data - - Chunk of data to parse. A document may be parsed piece-wise - by calling xml_parse several times with - new data, as long as the isFinal - parameter is set and &true; when the last data is parsed. - + + Chunk of data to parse. A document may be parsed piece-wise by + calling xml_parse several times with new data, + as long as the is_final parameter is set and + &true; when the last data is parsed. + - isFinal (optional) + is_final (optional) - - If set and &true;, data is the last - piece of data sent in this parse. - + + If set and &true;, data is the last piece of + data sent in this parse. + diff --git a/reference/xml/functions/xml-parser-create-ns.xml b/reference/xml/functions/xml-parser-create-ns.xml index 3c53be7eb7..01152ed57c 100644 --- a/reference/xml/functions/xml-parser-create-ns.xml +++ b/reference/xml/functions/xml-parser-create-ns.xml @@ -1,5 +1,5 @@ - + @@ -10,11 +10,11 @@ Description - - intxml_parser_create_ns - stringencoding - stringsep - + + resourcexml_parser_create_ns + stringencoding + stringsep + &warn.undocumented.func; diff --git a/reference/xml/functions/xml-parser-create.xml b/reference/xml/functions/xml-parser-create.xml index 26ed35323b..996c049f65 100644 --- a/reference/xml/functions/xml-parser-create.xml +++ b/reference/xml/functions/xml-parser-create.xml @@ -1,5 +1,5 @@ - + @@ -8,30 +8,29 @@ Description - - intxml_parser_create - stringencoding - + + resourcexml_parser_create + stringencoding + encoding (optional) - - Which character encoding the parser should use. The - following character encodings are supported: - - ISO-8859-1 (default) - US-ASCII - UTF-8 - - + + Which character encoding the parser should use. The following + character encodings are supported: + + ISO-8859-1 (default) + US-ASCII + UTF-8 + + - This function creates an XML parser and returns a handle for use - by other XML functions. Returns &false; on - failure. + This function creates an XML parser and returns a handle for use by other + XML functions. Returns &false; on failure. diff --git a/reference/xml/functions/xml-parser-free.xml b/reference/xml/functions/xml-parser-free.xml index 99deef27cc..59f3b3d764 100644 --- a/reference/xml/functions/xml-parser-free.xml +++ b/reference/xml/functions/xml-parser-free.xml @@ -1,5 +1,5 @@ - + @@ -8,25 +8,24 @@ Description - - stringxml_parser_free - intparser - + + boolxml_parser_free + resourceparser + parser - - A reference to the XML parser to free. - + + A reference to the XML parser to free. + - This function returns &false; if parser does - not refer to a valid parser, or else it frees the parser and - returns &true;. + This function returns &false; if parser does not + refer to a valid parser, or else it frees the parser and returns &true;. diff --git a/reference/xml/functions/xml-parser-get-option.xml b/reference/xml/functions/xml-parser-get-option.xml index 8ba74a4db8..36ed60fc11 100644 --- a/reference/xml/functions/xml-parser-get-option.xml +++ b/reference/xml/functions/xml-parser-get-option.xml @@ -1,5 +1,5 @@ - + @@ -8,30 +8,28 @@ Description - - mixedxml_parser_get_option - intparser - intoption - + + mixedxml_parser_get_option + resourceparser + intoption + parser - - A reference to the XML parser to get an option - from. - + + A reference to the XML parser to get an option from. + option - - Which option to fetch. See - xml_parser_set_option for a list of - options. - + + Which option to fetch. See + xml_parser_set_option for a list of options. + diff --git a/reference/xml/functions/xml-parser-set-option.xml b/reference/xml/functions/xml-parser-set-option.xml index b791e48f4c..b22ea7b53c 100644 --- a/reference/xml/functions/xml-parser-set-option.xml +++ b/reference/xml/functions/xml-parser-set-option.xml @@ -1,5 +1,5 @@ - + @@ -8,44 +8,44 @@ Description - - intxml_parser_set_option - intparser - intoption - mixedvalue - + + boolxml_parser_set_option + resourceparser + intoption + mixedvalue + parser - - A reference to the XML parser to set an option in. - + + A reference to the XML parser to set an option in. + option - - Which option to set. See below. - + + Which option to set. See below. + value - - The option's new value. - + + The option's new value. + - This function returns &false; if parser does - not refer to a valid parser, or if the option could not be set. - Else the option is set and &true; is returned. + This function returns &false; if parser does not + refer to a valid parser, or if the option could not be set. Else the + option is set and &true; is returned. The following options are available: @@ -53,34 +53,33 @@ XML parser options - - Option constant - Data type - Description - + + Option constant + Data type + Description + - - XML_OPTION_CASE_FOLDING - integer - - Controls whether case-folding is enabled - for this XML parser. Enabled by default. - - - - XML_OPTION_TARGET_ENCODING - string - - Sets which target - encoding to use in this XML parser. By default, it - is set to the same as the source encoding used by - xml_parser_create. Supported target - encodings are ISO-8859-1, - US-ASCII and UTF-8. - - + + XML_OPTION_CASE_FOLDING + integer + + Controls whether case-folding is enabled for this + XML parser. Enabled by default. + + + + XML_OPTION_TARGET_ENCODING + string + + Sets which target encoding to + use in this XML parser. By default, it is set to the same as the + source encoding used by xml_parser_create. + Supported target encodings are ISO-8859-1, + US-ASCII and UTF-8. + + diff --git a/reference/xml/functions/xml-set-character-data-handler.xml b/reference/xml/functions/xml-set-character-data-handler.xml index bbb33c60a7..fb9233192c 100644 --- a/reference/xml/functions/xml-set-character-data-handler.xml +++ b/reference/xml/functions/xml-set-character-data-handler.xml @@ -1,5 +1,5 @@ - + @@ -8,49 +8,49 @@ Description - - intxml_set_character_data_handler - intparser - stringhandler - + + boolxml_set_character_data_handler + resourceparser + stringhandler + Sets the character data handler function for the XML parser - parser. handler is - a string containing the name of a function that must exist when + parser. handler is a + string containing the name of a function that must exist when xml_parse is called for - parser. + parser. + The function named by handler must accept two parameters: - handler - intparser - stringdata + handler + resourceparser + stringdata parser - - The first parameter, parser, is a - reference to the XML parser calling the handler. - + + The first parameter, parser, is a + reference to the XML parser calling the handler. + data - - The second parameter, data, contains - the character data as a string. - + + The second parameter, data, contains + the character data as a string. + - If a handler function is set to an empty string, or - &false;, the handler in question is - disabled. + If a handler function is set to an empty string, or &false;, the handler + in question is disabled. &true; is returned if the handler is set up, &false; if diff --git a/reference/xml/functions/xml-set-default-handler.xml b/reference/xml/functions/xml-set-default-handler.xml index 5f4420aa83..01c2bd1881 100644 --- a/reference/xml/functions/xml-set-default-handler.xml +++ b/reference/xml/functions/xml-set-default-handler.xml @@ -1,5 +1,5 @@ - + @@ -8,56 +8,56 @@ Description - - intxml_set_default_handler - intparser - stringhandler - + + boolxml_set_default_handler + resourceparser + stringhandler + Sets the default handler function for the XML parser - parser. handler is - a string containing the name of a function that must exist when + parser. handler is a + string containing the name of a function that must exist when xml_parse is called for - parser. + parser. + The function named by handler must accept two parameters: - handler - intparser - stringdata + handler + resourceparser + stringdata - parser + parser - - The first parameter, parser, is a - reference to the XML parser calling the - handler. - + + The first parameter, parser, is a + reference to the XML parser calling the handler. + - data + data - - The second parameter, data, contains - the character data. This may be the XML declaration, - document type declaration, entities or other data for which - no other handler exists. - + + The second parameter, data, contains + the character data. This may be the XML declaration, + document type declaration, entities or other data for which + no other handler exists. + - If a handler function is set to an empty string, or - &false;, the handler in question is disabled. + If a handler function is set to an empty string, or &false;, the handler + in question is disabled. &true; is returned if the handler is set up, &false; if diff --git a/reference/xml/functions/xml-set-element-handler.xml b/reference/xml/functions/xml-set-element-handler.xml index 614f9b088d..1aab53cf6d 100644 --- a/reference/xml/functions/xml-set-element-handler.xml +++ b/reference/xml/functions/xml-set-element-handler.xml @@ -1,5 +1,5 @@ - + @@ -8,111 +8,107 @@ Description - - intxml_set_element_handler - intparser - stringstartElementHandler - stringendElementHandler - + + boolxml_set_element_handler + resourceparser + stringstart_element_handler + stringend_element_handler + Sets the element handler functions for the XML parser parser. - startElementHandler and - endElementHandler are strings containing + start_element_handler and + end_element_handler are strings containing the names of functions that must exist when xml_parse is called for parser. - The function named by startElementHandler + The function named by start_element_handler must accept three parameters: - startElementHandler - intparser - stringname - arrayattribs + start_element_handler + resourceparser + stringname + arrayattribs parser - - The first parameter, parser, is a - reference to the XML parser calling the - handler. - + + The first parameter, parser, is a + reference to the XML parser calling the handler. + name - - The second parameter, name, contains - the name of the element for which this handler is called. If - case-folding is in - effect for this parser, the element name will be in uppercase - letters. - + + The second parameter, name, contains the name + of the element for which this handler is called. If case-folding is in effect for this + parser, the element name will be in uppercase letters. + attribs - - The third parameter, attribs, contains - an associative array with the element's attributes (if any). - The keys of this array are the attribute names, the values - are the attribute values. Attribute names are case-folded on the same - criteria as element names. Attribute values are - not case-folded. - - - The original order of the attributes can be retrieved by - walking through attribs the normal - way, using each. The first key in the - array was the first attribute, and so on. - + + The third parameter, attribs, contains an + associative array with the element's attributes (if any). The keys + of this array are the attribute names, the values are the attribute + values. Attribute names are case-folded on the same criteria as + element names. Attribute values are not + case-folded. + + + The original order of the attributes can be retrieved by walking + through attribs the normal way, using + each. The first key in the array was the first + attribute, and so on. + - The function named by endElementHandler + The function named by end_element_handler must accept two parameters: - endElementHandler - intparser + end_element_handler + resourceparser stringname parser - - The first parameter, parser, is a - reference to the XML parser calling the - handler. - + + The first parameter, parser, is a + reference to the XML parser calling the handler. + name - - The second parameter, name, contains - the name of the element for which this handler is called. If - case-folding is in - effect for this parser, the element name will be in uppercase - letters. - + + The second parameter, name, contains the name + of the element for which this handler is called. If case-folding is in effect for this + parser, the element name will be in uppercase letters. + - If a handler function is set to an empty string, or - &false;, the handler in question is disabled. + If a handler function is set to an empty string, or &false;, the handler + in question is disabled. &true; is returned if the handlers are set up, &false; if diff --git a/reference/xml/functions/xml-set-end-namespace-decl-handler.xml b/reference/xml/functions/xml-set-end-namespace-decl-handler.xml index 3b5673bee3..ebc3da45fb 100644 --- a/reference/xml/functions/xml-set-end-namespace-decl-handler.xml +++ b/reference/xml/functions/xml-set-end-namespace-decl-handler.xml @@ -1,5 +1,5 @@ - + @@ -10,11 +10,11 @@ Description - - intxml_set_end_namespace_decl_handler - intpind - stringhdl - + + boolxml_set_end_namespace_decl_handler + resourcepind + stringhdl + &warn.undocumented.func; diff --git a/reference/xml/functions/xml-set-external-entity-ref-handler.xml b/reference/xml/functions/xml-set-external-entity-ref-handler.xml index fe4ea2b5b2..813f2c8e47 100644 --- a/reference/xml/functions/xml-set-external-entity-ref-handler.xml +++ b/reference/xml/functions/xml-set-external-entity-ref-handler.xml @@ -1,5 +1,5 @@ - + @@ -8,11 +8,11 @@ Description - - intxml_set_external_entity_ref_handler - intparser - stringhandler - + + boolxml_set_external_entity_ref_handler + resourceparser + stringhandler + Sets the notation declaration handler function for the XML parser parser. handler is @@ -28,72 +28,70 @@ xml_get_error_code will return XML_ERROR_EXTERNAL_ENTITY_HANDLING. - inthandler - intparser - stringopenEntityNames - stringbase - stringsystemId - stringpublicId + handler + resourceparser + stringopen_entity_names + stringbase + stringsystem_id + stringpublic_id parser - - The first parameter, parser, is a - reference to the XML parser calling the handler. - + + The first parameter, parser, is a + reference to the XML parser calling the handler. + - openEntityNames + open_entity_names - - The second parameter, openEntityNames, - is a space-separated list of the names of the entities that - are open for the parse of this entity (including the name of - the referenced entity). - + + The second parameter, open_entity_names, is a + space-separated list of the names of the entities that are open for + the parse of this entity (including the name of the referenced + entity). + base - - This is the base for resolving the system identifier - (systemid) of the external entity. - Currently this parameter will always be set to an empty - string. - + + This is the base for resolving the system identifier + (systemid) of the external entity. Currently + this parameter will always be set to an empty string. + - systemId + system_id - - The fourth parameter, systemId, is the - system identifier as specified in the entity declaration. - + + The fourth parameter, system_id, is the + system identifier as specified in the entity declaration. + - publicId + public_id - - The fifth parameter, publicId, is the - public identifier as specified in the entity declaration, or - an empty string if none was specified; the whitespace in the - public identifier will have been normalized as required by - the XML spec. - + + The fifth parameter, public_id, is the + public identifier as specified in the entity declaration, or + an empty string if none was specified; the whitespace in the + public identifier will have been normalized as required by + the XML spec. + - If a handler function is set to an empty string, or - &false;, the handler in question is - disabled. + If a handler function is set to an empty string, or &false;, the handler + in question is disabled. &true; is returned if the handler is set up, &false; if diff --git a/reference/xml/functions/xml-set-notation-decl-handler.xml b/reference/xml/functions/xml-set-notation-decl-handler.xml index 0b239fdecc..8a12539654 100644 --- a/reference/xml/functions/xml-set-notation-decl-handler.xml +++ b/reference/xml/functions/xml-set-notation-decl-handler.xml @@ -1,5 +1,5 @@ - + @@ -8,11 +8,11 @@ Description - - intxml_set_notation_decl_handler - intparser - stringhandler - + + boolxml_set_notation_decl_handler + resourceparser + stringhandler + Sets the notation declaration handler function for the XML parser parser. handler is @@ -23,8 +23,8 @@ A notation declaration is part of the document's DTD and has the following format: <!NOTATION - name {systemId | - publicId}> See name {system_id | + public_id}> See section 4.7 of the XML 1.0 spec for the definition of notation declarations. @@ -32,74 +32,69 @@ The function named by handler must accept five parameters: - handler - intparser - stringnotationName - stringbase - stringsystemId - stringpublicId + handler + resourceparser + stringnotation_name + stringbase + stringsystem_id + stringpublic_id - parser + parser - - The first parameter, parser, is a - reference to the XML parser calling the - handler. - + + The first parameter, parser, is a + reference to the XML parser calling the handler. + - notationName + notation_name - - This is the notation's name, as per - the notation format described above. - + + This is the notation's name, as per + the notation format described above. + - base + base - - This is the base for resolving the system identifier - (systemId) of the notation - declaration. Currently this parameter will always be set to - an empty string. - + + This is the base for resolving the system identifier + (system_id) of the notation declaration. + Currently this parameter will always be set to an empty string. + - systemId + system_id - - System identifier of the external notation - declaration. - + + System identifier of the external notation declaration. + - publicId + public_id - - Public identifier of the external notation - declaration. - + + Public identifier of the external notation declaration. + - If a handler function is set to an empty string, or - &false;, the handler in question is - disabled. + If a handler function is set to an empty string, or &false;, the handler + in question is disabled. &true; is returned if the handler is set up, &false; if diff --git a/reference/xml/functions/xml-set-object.xml b/reference/xml/functions/xml-set-object.xml index 62df5a4aa9..2c676130b2 100644 --- a/reference/xml/functions/xml-set-object.xml +++ b/reference/xml/functions/xml-set-object.xml @@ -1,5 +1,5 @@ - + @@ -8,50 +8,56 @@ Description - - voidxml_set_object - intparser - object&object - + + voidxml_set_object + resourceparser + object&object + This function allows to use parser inside - object. All callback functions could be - set with xml_set_element_handler etc and - assumed to be methods of object. + object. All callback functions could be set with + xml_set_element_handler etc and assumed to be + methods of object. parser = xml_parser_create(); - xml_set_object($this->parser,&$this); - xml_set_element_handler($this->parser,"tag_open","tag_close"); - xml_set_character_data_handler($this->parser,"cdata"); -} + function xml() + { + $this->parser = xml_parser_create(); -function parse($data) { - xml_parse($this->parser,$data); -} + xml_set_object($this->parser, &$this); + xml_set_element_handler($this->parser, "tag_open", "tag_close"); + xml_set_character_data_handler($this->parser, "cdata"); + } -function tag_open($parser,$tag,$attributes) { - var_dump($parser,$tag,$attributes); -} + function parse($data) + { + xml_parse($this->parser, $data); + } -function cdata($parser,$cdata) { - var_dump($parser,$cdata); -} + function tag_open($parser, $tag, $attributes) + { + var_dump($parser, $tag, $attributes); + } -function tag_close($parser,$tag) { - var_dump($parser,$tag); -} + function cdata($parser, $cdata) + { + var_dump($parser, $cdata); + } + + function tag_close($parser, $tag) + { + var_dump($parser, $tag); + } } // end of class xml $xml_parser = new xml(); -$xml_parser->parse("PHP"); +$xml_parser->parse("PHP"); ?> ]]> diff --git a/reference/xml/functions/xml-set-processing-instruction-handler.xml b/reference/xml/functions/xml-set-processing-instruction-handler.xml index c5293c3a06..5183e94ceb 100644 --- a/reference/xml/functions/xml-set-processing-instruction-handler.xml +++ b/reference/xml/functions/xml-set-processing-instruction-handler.xml @@ -1,5 +1,5 @@ - + @@ -10,17 +10,17 @@ Description - - intxml_set_processing_instruction_handler - intparser - stringhandler - + + boolxml_set_processing_instruction_handler + resourceparser + stringhandler + - Sets the processing instruction (PI) handler function for the XML - parser parser. - handler is a string containing the name of - a function that must exist when xml_parse is - called for parser. + Sets the processing instruction (PI) handler function for the XML parser + parser. handler is a + string containing the name of a function that must exist when + xml_parse is called for + parser. A processing instruction has the following format: @@ -30,45 +30,54 @@ data?> - You can put PHP code into such a tag, but be aware of one - limitation: in an XML PI, the PI end tag - (?>) can not be quoted, so this character - sequence should not appear in the PHP code you embed with PIs in - XML documents. If it does, the rest of the PHP code, as well as - the "real" PI end tag, will be treated as character data. + You can put PHP code into such a tag, but be aware of one limitation: in + an XML PI, the PI end tag (?>) can not be quoted, + so this character sequence should not appear in the PHP code you embed + with PIs in XML documents. If it does, the rest of the PHP code, as well + as the "real" PI end tag, will be treated as character data. The function named by handler must accept three parameters: - handler - intparser - stringtarget - stringdata + handler + resourceparser + stringtarget + stringdata - parser - The first parameter, parser, is a - reference to the XML parser calling the - handler. + parser + + + The first parameter, parser, is a + reference to the XML parser calling the handler. + + target - - The second parameter, target, contains - the PI target. + + + The second parameter, target, contains the PI + target. + + data - - The third parameter, data, contains - the PI data. + + + The third parameter, data, contains the PI + data. + + - + + - If a handler function is set to an empty string, or - &false;, the handler in question is disabled. + If a handler function is set to an empty string, or &false;, the handler + in question is disabled. &true; is returned if the handler is set up, &false; if diff --git a/reference/xml/functions/xml-set-start-namespace-decl-handler.xml b/reference/xml/functions/xml-set-start-namespace-decl-handler.xml index 781f6b2f7c..eabce32e0d 100644 --- a/reference/xml/functions/xml-set-start-namespace-decl-handler.xml +++ b/reference/xml/functions/xml-set-start-namespace-decl-handler.xml @@ -1,5 +1,5 @@ - + @@ -10,11 +10,11 @@ Description - - intxml_set_start_namespace_decl_handler - intpind - stringhdl - + + boolxml_set_start_namespace_decl_handler + resourcepind + stringhdl + &warn.undocumented.func; diff --git a/reference/xml/functions/xml-set-unparsed-entity-decl-handler.xml b/reference/xml/functions/xml-set-unparsed-entity-decl-handler.xml index 7ba353e3ee..da2788b3ad 100644 --- a/reference/xml/functions/xml-set-unparsed-entity-decl-handler.xml +++ b/reference/xml/functions/xml-set-unparsed-entity-decl-handler.xml @@ -1,5 +1,5 @@ - + @@ -10,17 +10,18 @@ Description - - intxml_set_unparsed_entity_decl_handler - intparser - stringhandler - + + boolxml_set_unparsed_entity_decl_handler + resourceparser + stringhandler + - Sets the unparsed entity declaration handler function for the XML - parser parser. - handler is a string containing the name of - a function that must exist when xml_parse is - called for parser. + Sets the unparsed entity declaration handler function for the XML parser + parser. handler is a + string containing the name of a function that must exist when + xml_parse is called for + parser. + This handler will be called if the XML parser encounters an external entity declaration with an NDATA declaration, like the @@ -35,75 +36,76 @@ the XML 1.0 spec for the definition of notation declared external entities. - The function named by - handler must accept six parameters: + + The function named by handler must accept six + parameters: - handler - intparser - stringentityName - stringbase - stringsystemId - stringpublicId - stringnotationName + handler + resourceparser + stringentity_name + stringbase + stringsystem_id + stringpublic_id + stringnotation_name parser - - The first parameter, parser, is a - reference to the XML parser calling the - handler. - + + The first parameter, parser, is a + reference to the XML parser calling the + handler. + - entityName + entity_name - - The name of the entity that is about to be defined. - + + The name of the entity that is about to be defined. + base - - This is the base for resolving the system identifier - (systemId) of the external - entity. Currently this parameter will always be set to - an empty string. - + + + This is the base for resolving the system identifier + (systemId) of the external entity. Currently + this parameter will always be set to an empty string. + - systemId + system_id - - System identifier for the external entity. - + + System identifier for the external entity. + - publicId + public_id - - Public identifier for the external entity. - + + Public identifier for the external entity. + - notationName + notation_name - - Name of the notation of this entity (see - xml_set_notation_decl_handler). - + + Name of the notation of this entity (see + xml_set_notation_decl_handler). + - If a handler function is set to an empty string, or - &false;, the handler in question is disabled. + If a handler function is set to an empty string, or &false;, the handler + in question is disabled. &true; is returned if the handler is set up, &false; if