reference/xml/functions/xml-set-start-namespace-decl-handler.xml
5a14f904d231d294e2e5b4fb5d2fc4d2fd9eddee
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id='function.xml-set-start-namespace-decl-handler'>
3
+
<refentry xml:id="function.xml-set-start-namespace-decl-handler" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>xml_set_start_namespace_decl_handler</refname>
6
6
<refpurpose>
...
...
@@ -11,8 +11,8 @@
11
11
<refsect1 role="description">
12
12
&reftitle.description;
13
13
<methodsynopsis>
14
-
<type>bool</type><methodname>xml_set_start_namespace_decl_handler</methodname>
15
-
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
14
+
<type>true</type><methodname>xml_set_start_namespace_decl_handler</methodname>
15
+
<methodparam><type>XMLParser</type><parameter>parser</parameter></methodparam>
16
16
<methodparam><type>callable</type><parameter>handler</parameter></methodparam>
17
17
</methodsynopsis>
18
18
<para>
...
...
@@ -27,50 +27,27 @@
27
27
&reftitle.parameters;
28
28
<para>
29
29
<variablelist>
30
-
<varlistentry>
31
-
<term><parameter>parser</parameter></term>
32
-
<listitem>
33
-
<para>
34
-
A reference to the XML parser.
35
-
</para>
36
-
</listitem>
37
-
</varlistentry>
30
+
&xml.parser.param;
38
31
<varlistentry>
39
32
<term><parameter>handler</parameter></term>
40
33
<listitem>
34
+
&xml.handler.description;
41
35
<para>
42
-
<parameter>handler</parameter> is a string containing the name of a
43
-
function that must exist when <function>xml_parse</function> is called
44
-
for <parameter>parser</parameter>.
45
-
</para>
46
-
<para>
47
-
The function named by <parameter>handler</parameter> must accept
48
-
three parameters, and should return an integer value. If the
49
-
value returned from the handler is &false; (which it will be if no
50
-
value is returned), the XML parser will stop parsing and
51
-
<function>xml_get_error_code</function> will return
52
-
<constant>XML_ERROR_EXTERNAL_ENTITY_HANDLING</constant>.
36
+
The signature of the handler must be:
53
37
<methodsynopsis>
54
-
<methodname><replaceable>handler</replaceable></methodname>
55
-
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
56
-
<methodparam><type>string</type><parameter>prefix</parameter></methodparam>
38
+
<type>void</type><methodname><replaceable>handler</replaceable></methodname>
39
+
<methodparam><type>XMLParser</type><parameter>parser</parameter></methodparam>
40
+
<methodparam><type class="union"><type>string</type><type>false</type></type><parameter>prefix</parameter></methodparam>
57
41
<methodparam><type>string</type><parameter>uri</parameter></methodparam>
58
42
</methodsynopsis>
59
43
<variablelist>
60
-
<varlistentry>
61
-
<term><parameter>parser</parameter></term>
62
-
<listitem>
63
-
<simpara>
64
-
The first parameter, <replaceable>parser</replaceable>, is a
65
-
reference to the XML parser calling the handler.
66
-
</simpara>
67
-
</listitem>
68
-
</varlistentry>
44
+
&xml.handler.parser.param;
69
45
<varlistentry>
70
46
<term><parameter>prefix</parameter></term>
71
47
<listitem>
72
48
<simpara>
73
49
The prefix is a string used to reference the namespace within an XML object.
50
+
&false; if no prefix exists.
74
51
</simpara>
75
52
</listitem>
76
53
</varlistentry>
...
...
@@ -84,11 +61,6 @@
84
61
</varlistentry>
85
62
</variablelist>
86
63
</para>
87
-
<para>
88
-
If a handler function is set to an empty string, or &false;, the handler
89
-
in question is disabled.
90
-
</para>
91
-
&note.func-callback;
92
64
</listitem>
93
65
</varlistentry>
94
66
</variablelist>
...
...
@@ -97,9 +69,27 @@
97
69
<refsect1 role="returnvalues">
98
70
&reftitle.returnvalues;
99
71
<para>
100
-
&return.success;
72
+
&return.true.always;
101
73
</para>
102
74
</refsect1>
75
+

76
+
<refsect1 role="changelog">
77
+
&reftitle.changelog;
78
+
<informaltable>
79
+
<tgroup cols="2">
80
+
<thead>
81
+
<row>
82
+
<entry>&Version;</entry>
83
+
<entry>&Description;</entry>
84
+
</row>
85
+
</thead>
86
+
<tbody>
87
+
&xml.changelog.parser-param;
88
+
</tbody>
89
+
</tgroup>
90
+
</informaltable>
91
+
</refsect1>
92
+

103
93
<refsect1 role="seealso">
104
94
&reftitle.seealso;
105
95
<para>
106
96