reference/dom/domattr/isid.xml
c1f37a6c270aadbbb3da56a3973ffd62197adf2b
c1f37a6c270aadbbb3da56a3973ffd62197adf2b
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xml:id='domattr.isid' xmlns="http://docbook.org/ns/docbook">
3
+
<refentry xml:id="domattr.isid" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>DOMAttr::isId</refname>
6
6
<refpurpose>
...
...
@@ -9,7 +9,7 @@
9
9
</refnamediv>
10
10
<refsect1 role="description">
11
11
&reftitle.description;
12
-
<methodsynopsis>
12
+
<methodsynopsis role="DOMAttr">
13
13
<modifier>public</modifier> <type>bool</type><methodname>DOMAttr::isId</methodname>
14
14
<void/>
15
15
</methodsynopsis>
...
...
@@ -19,15 +19,21 @@
19
19
<para>
20
20
According to the DOM standard this requires a DTD which defines the
21
21
attribute ID to be of type ID. You need to validate your document with
22
-
<xref linkend="domdocument.validate" />
23
-
or <literal>DOMDocument::validateOnParse</literal> before using this function.
22
+
<xref linkend="domdocument.validate"/>
23
+
or <property>DOMDocument::$validateOnParse</property> before using this function.
24
24
</para>
25
25
</refsect1>
26
+
27
+
<refsect1 role="parameters">
28
+
&reftitle.parameters;
29
+
&no.function.parameters;
30
+
</refsect1>
31
+
26
32
<refsect1 role="returnvalues">
27
33
&reftitle.returnvalues;
28
-
<para>
29
-
&return.success;
30
-
</para>
34
+
<simpara>
35
+
Returns &true; if this attribute is a defined ID, &false; otherwise.
36
+
</simpara>
31
37
</refsect1>
32
38
<refsect1 role="examples">
33
39
&reftitle.examples;
...
...
@@ -38,11 +44,11 @@
38
44
<![CDATA[
39
45
<?php
40
46
41
-
$doc = new DomDocument;
47
+
$doc = new DOMDocument;
42
48
43
49
// We need to validate our document before referring to the id
44
50
$doc->validateOnParse = true;
45
-
$doc->Load('book.xml');
51
+
$doc->load('examples/book-docbook.xml');
46
52
47
53
// We retrieve the attribute named id of the chapter element
48
54
$attr = $doc->getElementsByTagName('chapter')->item(0)->getAttributeNode('id');
...
...
@@ -56,7 +62,6 @@ var_dump($attr->isId()); // bool(true)
56
62
</para>
57
63
</refsect1>
58
64
</refentry>
59
-
60
65
<!-- Keep this comment at the end of the file
61
66
Local variables:
62
67
mode: sgml
63
68