Skip to content

Commit cad410b

Browse files
committed
[PHP8.4] Document tidyNode::getNextSibling() and tidyNode::getPreviousSibling()の翻訳
1 parent 360102b commit cad410b

File tree

2 files changed

+190
-0
lines changed

2 files changed

+190
-0
lines changed
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
<refentry xml:id="tidynode.getnextsibling" xmlns="http://docbook.org/ns/docbook">
4+
<refnamediv>
5+
<refname>tidyNode::getNextSibling</refname>
6+
<refpurpose>現在のノードの直後の兄弟ノードを返す</refpurpose>
7+
</refnamediv>
8+
9+
<refsect1 role="description">
10+
&reftitle.description;
11+
<methodsynopsis role="tidyNode">
12+
<modifier>public</modifier> <type class="union"><type>tidyNode</type><type>null</type></type><methodname>tidyNode::getNextSibling</methodname>
13+
<void/>
14+
</methodsynopsis>
15+
<simpara>
16+
現在のノードの直後の兄弟ノードを返します。
17+
</simpara>
18+
</refsect1>
19+
20+
<refsect1 role="parameters">
21+
&reftitle.parameters;
22+
&no.function.parameters;
23+
</refsect1>
24+
25+
<refsect1 role="returnvalues">
26+
&reftitle.returnvalues;
27+
<simpara>
28+
ノードに直後の兄弟ノードがある場合は <type>tidyNode</type> を返し、なければ &null; を返します。
29+
</simpara>
30+
</refsect1>
31+
32+
<refsect1 role="examples">
33+
&reftitle.examples;
34+
<example>
35+
<title><function>tidyNode::getNextSibling</function> の例</title>
36+
<programlisting role="php">
37+
<![CDATA[
38+
<?php
39+
40+
$html = <<< HTML
41+
<html>
42+
<head>
43+
</head>
44+
<body>
45+
<p>Hello</p><p>World</p>
46+
</body>
47+
</html>
48+
49+
HTML;
50+
51+
52+
$tidy = tidy_parse_string($html);
53+
54+
$node = $tidy->body();
55+
var_dump($node->child[0]->getNextSibling()->value);
56+
57+
?>
58+
]]>
59+
</programlisting>
60+
&example.outputs;
61+
<screen>
62+
<![CDATA[
63+
string(13) "<p>World</p>
64+
"
65+
]]>
66+
</screen>
67+
</example>
68+
</refsect1>
69+
70+
<refsect1 role="seealso">
71+
&reftitle.seealso;
72+
<simplelist>
73+
<member><function>tidy::getParent</function></member>
74+
<member><function>tidy::getPreviousSibling</function></member>
75+
</simplelist>
76+
</refsect1>
77+
78+
</refentry>
79+
<!-- Keep this comment at the end of the file
80+
Local variables:
81+
mode: sgml
82+
sgml-omittag:t
83+
sgml-shorttag:t
84+
sgml-minimize-attributes:nil
85+
sgml-always-quote-attributes:t
86+
sgml-indent-step:1
87+
sgml-indent-data:t
88+
indent-tabs-mode:nil
89+
sgml-parent-document:nil
90+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
91+
sgml-exposed-tags:nil
92+
sgml-local-catalogs:nil
93+
sgml-local-ecat-files:nil
94+
End:
95+
vim600: syn=xml fen fdm=syntax fdl=2 si
96+
vim: et tw=78 syn=sgml
97+
vi: ts=1 sw=1
98+
-->
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- $Revision$ -->
3+
<refentry xml:id="tidynode.getprevioussibling" xmlns="http://docbook.org/ns/docbook">
4+
<refnamediv>
5+
<refname>tidyNode::getPreviousSibling</refname>
6+
<refpurpose>現在のノードの直前の兄弟ノードを返す</refpurpose>
7+
</refnamediv>
8+
9+
<refsect1 role="description">
10+
&reftitle.description;
11+
<methodsynopsis role="tidyNode">
12+
<modifier>public</modifier> <type class="union"><type>tidyNode</type><type>null</type></type><methodname>tidyNode::getPreviousSibling</methodname>
13+
<void/>
14+
</methodsynopsis>
15+
<simpara>
16+
現在のノードの直前の兄弟ノードを返します。
17+
</simpara>
18+
</refsect1>
19+
20+
<refsect1 role="parameters">
21+
&reftitle.parameters;
22+
&no.function.parameters;
23+
</refsect1>
24+
25+
<refsect1 role="returnvalues">
26+
&reftitle.returnvalues;
27+
<simpara>
28+
ノードに直前の兄弟ノードがある場合は <type>tidyNode</type> を返し、なければ &null; を返します。
29+
</simpara>
30+
</refsect1>
31+
32+
<refsect1 role="examples">
33+
&reftitle.examples;
34+
<example>
35+
<title><function>tidyNode::getPreviousSibling</function> の例</title>
36+
<programlisting role="php">
37+
<![CDATA[
38+
<?php
39+
$html = <<< HTML
40+
<html>
41+
<head>
42+
</head>
43+
<body>
44+
<p>Hello</p><p>World</p>
45+
</body>
46+
</html>
47+
HTML;
48+
$tidy = tidy_parse_string($html);
49+
$node = $tidy->body();
50+
var_dump($node->child[1]->getPreviousSibling()->value);
51+
?>
52+
]]>
53+
</programlisting>
54+
&example.outputs;
55+
<screen>
56+
<![CDATA[
57+
string(13) "<p>Hello</p>
58+
"
59+
]]>
60+
</screen>
61+
</example>
62+
</refsect1>
63+
64+
<refsect1 role="seealso">
65+
&reftitle.seealso;
66+
<simplelist>
67+
<member><function>tidy::getParent</function></member>
68+
<member><function>tidy::getNextSibling</function></member>
69+
</simplelist>
70+
</refsect1>
71+
72+
</refentry>
73+
<!-- Keep this comment at the end of the file
74+
Local variables:
75+
mode: sgml
76+
sgml-omittag:t
77+
sgml-shorttag:t
78+
sgml-minimize-attributes:nil
79+
sgml-always-quote-attributes:t
80+
sgml-indent-step:1
81+
sgml-indent-data:t
82+
indent-tabs-mode:nil
83+
sgml-parent-document:nil
84+
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
85+
sgml-exposed-tags:nil
86+
sgml-local-catalogs:nil
87+
sgml-local-ecat-files:nil
88+
End:
89+
vim600: syn=xml fen fdm=syntax fdl=2 si
90+
vim: et tw=78 syn=sgml
91+
vi: ts=1 sw=1
92+
-->

0 commit comments

Comments
 (0)