reference/xml/functions/xml-set-end-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-end-namespace-decl-handler'>
3
+
<refentry xml:id="function.xml-set-end-namespace-decl-handler" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>xml_set_end_namespace_decl_handler</refname>
6
6
<refpurpose>Set up end namespace declaration handler</refpurpose>
...
...
@@ -9,8 +9,8 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>bool</type><methodname>xml_set_end_namespace_decl_handler</methodname>
13
-
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
12
+
<type>true</type><methodname>xml_set_end_namespace_decl_handler</methodname>
13
+
<methodparam><type>XMLParser</type><parameter>parser</parameter></methodparam>
14
14
<methodparam><type>callable</type><parameter>handler</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
...
...
@@ -19,65 +19,43 @@
19
19
the handler for the end tag of the element in which the namespace was
20
20
declared.
21
21
</para>
22
+
<caution>
23
+
<para>
24
+
This event is not supported under libXML, so a registered handler wouldn't
25
+
be called.
26
+
</para>
27
+
</caution>
22
28
</refsect1>
23
29

24
30
<refsect1 role="parameters">
25
31
&reftitle.parameters;
26
32
<para>
27
33
<variablelist>
28
-
<varlistentry>
29
-
<term><parameter>parser</parameter></term>
30
-
<listitem>
31
-
<para>
32
-
A reference to the XML parser.
33
-
</para>
34
-
</listitem>
35
-
</varlistentry>
34
+
&xml.parser.param;
36
35
<varlistentry>
37
36
<term><parameter>handler</parameter></term>
38
37
<listitem>
38
+
&xml.handler.description;
39
39
<para>
40
-
<parameter>handler</parameter> is a string containing the name of a
41
-
function that must exist when <function>xml_parse</function> is called
42
-
for <parameter>parser</parameter>.
43
-
</para>
44
-
<para>
45
-
The function named by <parameter>handler</parameter> must accept
46
-
two parameters, and should return an integer value. If the
47
-
value returned from the handler is &false; (which it will be if no
48
-
value is returned), the XML parser will stop parsing and
49
-
<function>xml_get_error_code</function> will return
50
-
<constant>XML_ERROR_EXTERNAL_ENTITY_HANDLING</constant>.
40
+
The signature of the handler must be:
51
41
<methodsynopsis>
52
42
<methodname><replaceable>handler</replaceable></methodname>
53
-
<methodparam><type>resource</type><parameter>parser</parameter></methodparam>
54
-
<methodparam><type>string</type><parameter>prefix</parameter></methodparam>
43
+
<methodparam><type>XMLParser</type><parameter>parser</parameter></methodparam>
44
+
<methodparam><type class="union"><type>string</type><type>false</type></type><parameter>prefix</parameter></methodparam>
55
45
</methodsynopsis>
56
46
<variablelist>
57
-
<varlistentry>
58
-
<term><parameter>parser</parameter></term>
59
-
<listitem>
60
-
<simpara>
61
-
The first parameter, <replaceable>parser</replaceable>, is a
62
-
reference to the XML parser calling the handler.
63
-
</simpara>
64
-
</listitem>
65
-
</varlistentry>
47
+
&xml.handler.parser.param;
66
48
<varlistentry>
67
49
<term><parameter>prefix</parameter></term>
68
50
<listitem>
69
51
<simpara>
70
52
The prefix is a string used to reference the namespace within an XML object.
53
+
&false; if no prefix exists.
71
54
</simpara>
72
55
</listitem>
73
56
</varlistentry>
74
57
</variablelist>
75
58
</para>
76
-
<para>
77
-
If a handler function is set to an empty string, or &false;, the handler
78
-
in question is disabled.
79
-
</para>
80
-
&note.func-callback;
81
59
</listitem>
82
60
</varlistentry>
83
61
</variablelist>
...
...
@@ -87,17 +65,25 @@
87
65
<refsect1 role="returnvalues">
88
66
&reftitle.returnvalues;
89
67
<para>
90
-
&return.success;
68
+
&return.true.always;
91
69
</para>
92
70
</refsect1>
93
71

94
-
<refsect1 role="notes">
95
-
&reftitle.notes;
96
-
<note>
97
-
<para>
98
-
This event is not supported under LibXML.
99
-
</para>
100
-
</note>
72
+
<refsect1 role="changelog">
73
+
&reftitle.changelog;
74
+
<informaltable>
75
+
<tgroup cols="2">
76
+
<thead>
77
+
<row>
78
+
<entry>&Version;</entry>
79
+
<entry>&Description;</entry>
80
+
</row>
81
+
</thead>
82
+
<tbody>
83
+
&xml.changelog.parser-param;
84
+
</tbody>
85
+
</tgroup>
86
+
</informaltable>
101
87
</refsect1>
102
88

103
89
<refsect1 role="seealso">
...
...
@@ -110,7 +96,6 @@
110
96
</refsect1>
111
97

112
98
</refentry>
113
-

114
99
<!-- Keep this comment at the end of the file
115
100
Local variables:
116
101
mode: sgml
117
102