From 444499c03d12b5cc9b1cff27e61e7d88fdde942f Mon Sep 17 00:00:00 2001 From: jdkfx Date: Sun, 24 Nov 2024 13:26:40 +0900 Subject: [PATCH 1/7] =?UTF-8?q?DOMNode::DOCUMENT=5F*=E5=AE=9A=E6=95=B0?= =?UTF-8?q?=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E5=A4=89=E6=9B=B4=E5=B1=A5?= =?UTF-8?q?=E6=AD=B4=E3=81=AE=E7=BF=BB=E8=A8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/dom/domnode.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/reference/dom/domnode.xml b/reference/dom/domnode.xml index 70a521782e..7a1e70d363 100644 --- a/reference/dom/domnode.xml +++ b/reference/dom/domnode.xml @@ -292,6 +292,31 @@ + + 8.4.0 + + DOMNode::compareDocumentPosition メソッドが追加されました。 + + + + 8.4.0 + + 以下の定数が新たに追加されました。 + DOMNode::DOCUMENT_POSITION_DISCONNECTED、 + DOMNode::DOCUMENT_POSITION_PRECEDING、 + DOMNode::DOCUMENT_POSITION_FOLLOWING、 + DOMNode::DOCUMENT_POSITION_CONTAINS、 + DOMNode::DOCUMENT_POSITION_CONTAINED_BY、および + DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC。 + + + + 8.3.0 + + DOMNode::contains と、 + DOMNode::isEqualNode というメソッドが追加されました。 + + 8.3.0 From d88318e131a939349ccdee4cad8a2ad06c374a5b Mon Sep 17 00:00:00 2001 From: jdkfx Date: Sun, 24 Nov 2024 14:07:52 +0900 Subject: [PATCH 2/7] =?UTF-8?q?DOMNode::compareDocumentPosition=E3=80=81DO?= =?UTF-8?q?MNode::DOCUMENT=5F=E3=81=AE=E8=8B=B1=E6=96=87=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/dom/domnode.xml | 112 ++++++++++++++++++ .../dom/domnode/compareDocumentPosition.xml | 93 +++++++++++++++ 2 files changed, 205 insertions(+) create mode 100644 reference/dom/domnode/compareDocumentPosition.xml diff --git a/reference/dom/domnode.xml b/reference/dom/domnode.xml index 7a1e70d363..d3309e8ea4 100644 --- a/reference/dom/domnode.xml +++ b/reference/dom/domnode.xml @@ -25,6 +25,50 @@ DOMNode + &Constants; + + public + const + int + DOMNode::DOCUMENT_POSITION_DISCONNECTED + 1 + + + public + const + int + DOMNode::DOCUMENT_POSITION_PRECEDING + 2 + + + public + const + int + DOMNode::DOCUMENT_POSITION_FOLLOWING + 4 + + + public + const + int + DOMNode::DOCUMENT_POSITION_CONTAINS + 8 + + + public + const + int + DOMNode::DOCUMENT_POSITION_CONTAINED_BY + 16 + + + public + const + int + DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + 32 + + &Properties; public @@ -140,6 +184,74 @@ + +
+ &reftitle.constants; + + + + DOMNode::DOCUMENT_POSITION_DISCONNECTED + + + + Set when the other node and reference node are not in the same tree. + + + + + + DOMNode::DOCUMENT_POSITION_PRECEDING + + + + Set when the other node precedes the reference node. + + + + + + DOMNode::DOCUMENT_POSITION_FOLLOWING + + + + Set when the other node follows the reference node. + + + + + + DOMNode::DOCUMENT_POSITION_CONTAINS + + + + Set when the other node is an ancestor of the reference node. + + + + + + DOMNode::DOCUMENT_POSITION_CONTAINED_BY + + + + Set when the other node is a descendant of the reference node. + + + + + + DOMNode::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC + + + + Set when the result depends on implementation-specific behaviour and + may not be portable. + This may happen with disconnected nodes or with attribute nodes. + + + + +
diff --git a/reference/dom/domnode/compareDocumentPosition.xml b/reference/dom/domnode/compareDocumentPosition.xml new file mode 100644 index 0000000000..f094dc88d1 --- /dev/null +++ b/reference/dom/domnode/compareDocumentPosition.xml @@ -0,0 +1,93 @@ + + + + DOMNode::compareDocumentPosition + Compares the position of two nodes + + + + &reftitle.description; + + public intDOMNode::compareDocumentPosition + DOMNodeother + + + Compares the position of the other node relative to this node. + + + + + &reftitle.parameters; + + + other + + + The node for which the position should be compared for, relative to this node. + + + + + + + + &reftitle.returnvalues; + + A bitmask of the DOMNode::DOCUMENT_POSITION_* + constants. + + + + + &reftitle.examples; + + <methodname>DOMNode::compareDocumentPosition</methodname> example + + + + + +XML; +$dom = new DOMDocument(); +$dom->loadXML($xml); +$root = $dom->documentElement; +$child1 = $root->firstElementChild; +$child2 = $child1->nextElementSibling; +var_dump($root->compareDocumentPosition($child1)); +var_dump($child2->compareDocumentPosition($child1)); +?> +]]> + + &example.outputs; + + + + + + + \ No newline at end of file From 7dc529894dbdb7ee6d3515768ffb1fcc6bdd7e3e Mon Sep 17 00:00:00 2001 From: jdkfx Date: Sun, 24 Nov 2024 14:09:44 +0900 Subject: [PATCH 3/7] =?UTF-8?q?Revision=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/dom/domnode/compareDocumentPosition.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reference/dom/domnode/compareDocumentPosition.xml b/reference/dom/domnode/compareDocumentPosition.xml index f094dc88d1..d30ec7a03f 100644 --- a/reference/dom/domnode/compareDocumentPosition.xml +++ b/reference/dom/domnode/compareDocumentPosition.xml @@ -1,4 +1,7 @@ + + + DOMNode::compareDocumentPosition From c6df02b76a176bc41105692800bc8ec39b5e2c98 Mon Sep 17 00:00:00 2001 From: jdkfx Date: Sun, 24 Nov 2024 14:53:01 +0900 Subject: [PATCH 4/7] =?UTF-8?q?DOCUMENT=5FPOSITION=5F*=E5=AE=9A=E6=95=B0?= =?UTF-8?q?=E3=81=AE=E7=BF=BB=E8=A8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/dom/domnode.xml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/reference/dom/domnode.xml b/reference/dom/domnode.xml index d3309e8ea4..f51faf129e 100644 --- a/reference/dom/domnode.xml +++ b/reference/dom/domnode.xml @@ -194,7 +194,7 @@ - Set when the other node and reference node are not in the same tree. + 他のノードと参照ノードが同じツリー内にない場合に設定されます。 @@ -204,7 +204,7 @@ - Set when the other node precedes the reference node. + 他のノードが参照ノードより前にある場合に設定されます。 @@ -214,7 +214,7 @@ - Set when the other node follows the reference node. + 他のノードが参照ノードの後に続く場合に設定されます。 @@ -224,7 +224,7 @@ - Set when the other node is an ancestor of the reference node. + 他のノードが参照ノードの祖先である場合に設定されます。 @@ -234,7 +234,7 @@ - Set when the other node is a descendant of the reference node. + 他のノードが参照ノードの子孫である場合に設定されます。 @@ -244,9 +244,8 @@ - Set when the result depends on implementation-specific behaviour and - may not be portable. - This may happen with disconnected nodes or with attribute nodes. + 結果が実装依存の動作に基づいており、移植性がない場合に設定されます。 + これは、同じツリー内にないノードや属性ノードの場合に発生する可能性があります。 From c4737031a74890f9bd71ab1c41dca15c54b53265 Mon Sep 17 00:00:00 2001 From: jdkfx Date: Sun, 24 Nov 2024 14:55:05 +0900 Subject: [PATCH 5/7] =?UTF-8?q?EN-Revision=E3=81=AE=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/dom/domnode.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reference/dom/domnode.xml b/reference/dom/domnode.xml index f51faf129e..8049417e10 100644 --- a/reference/dom/domnode.xml +++ b/reference/dom/domnode.xml @@ -1,6 +1,6 @@ - - + + DOMNode クラス DOMNode From d0eebcf836a292b7e0d69ce922db7d4bb2f8ff07 Mon Sep 17 00:00:00 2001 From: jdkfx Date: Sun, 24 Nov 2024 15:25:44 +0900 Subject: [PATCH 6/7] =?UTF-8?q?DOMNode::compareDocumentPosition=E3=81=AE?= =?UTF-8?q?=E7=BF=BB=E8=A8=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/dom/domnode.xml | 10 +++++----- reference/dom/domnode/compareDocumentPosition.xml | 15 +++++++-------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/reference/dom/domnode.xml b/reference/dom/domnode.xml index 8049417e10..f4154e4d73 100644 --- a/reference/dom/domnode.xml +++ b/reference/dom/domnode.xml @@ -194,7 +194,7 @@ - 他のノードと参照ノードが同じツリー内にない場合に設定されます。 + もう一方のノードと参照ノードが同じツリー内にない場合に設定されます。 @@ -204,7 +204,7 @@ - 他のノードが参照ノードより前にある場合に設定されます。 + もう一方のノードが参照ノードより前にある場合に設定されます。 @@ -214,7 +214,7 @@ - 他のノードが参照ノードの後に続く場合に設定されます。 + もう一方のノードが参照ノードの後に続く場合に設定されます。 @@ -224,7 +224,7 @@ - 他のノードが参照ノードの祖先である場合に設定されます。 + もう一方のノードが参照ノードの祖先である場合に設定されます。 @@ -234,7 +234,7 @@ - 他のノードが参照ノードの子孫である場合に設定されます。 + もう一方のノードが参照ノードの子孫である場合に設定されます。 diff --git a/reference/dom/domnode/compareDocumentPosition.xml b/reference/dom/domnode/compareDocumentPosition.xml index d30ec7a03f..a9e2363e74 100644 --- a/reference/dom/domnode/compareDocumentPosition.xml +++ b/reference/dom/domnode/compareDocumentPosition.xml @@ -5,7 +5,7 @@ DOMNode::compareDocumentPosition - Compares the position of two nodes + 2つのノードの位置を比較します。 @@ -15,7 +15,7 @@ DOMNodeother - Compares the position of the other node relative to this node. + このノードに対するもう一方のノードの位置を比較します。 @@ -26,7 +26,7 @@ other - The node for which the position should be compared for, relative to this node. + このノードに対して、位置を比較すべきノード。 @@ -36,15 +36,14 @@ &reftitle.returnvalues; - A bitmask of the DOMNode::DOCUMENT_POSITION_* - constants. + DOMNode::DOCUMENT_POSITION_* 定数のビットマスク。 &reftitle.examples; - <methodname>DOMNode::compareDocumentPosition</methodname> example + <methodname>DOMNode::compareDocumentPosition</methodname> の例 compareDocumentPosition($child1)); &example.outputs; From b8929b9ae0ea6fa388549330c3c8acdca4871ab7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=AD=A6=E7=94=B0=20=E6=86=B2=E5=A4=AA=E9=83=8E?= Date: Sun, 24 Nov 2024 22:46:24 +0900 Subject: [PATCH 7/7] =?UTF-8?q?=E3=82=A4=E3=83=B3=E3=83=87=E3=83=B3?= =?UTF-8?q?=E3=83=88=E3=82=84=E6=94=B9=E8=A1=8C=E3=82=92=E5=8E=9F=E6=96=87?= =?UTF-8?q?=E3=81=A8=E6=8F=83=E3=81=88=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reference/dom/domnode.xml | 2 +- reference/dom/domnode/compareDocumentPosition.xml | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/reference/dom/domnode.xml b/reference/dom/domnode.xml index f4154e4d73..6d3a8262d9 100644 --- a/reference/dom/domnode.xml +++ b/reference/dom/domnode.xml @@ -251,7 +251,7 @@
- +
&reftitle.properties; diff --git a/reference/dom/domnode/compareDocumentPosition.xml b/reference/dom/domnode/compareDocumentPosition.xml index a9e2363e74..5f84b6123b 100644 --- a/reference/dom/domnode/compareDocumentPosition.xml +++ b/reference/dom/domnode/compareDocumentPosition.xml @@ -53,11 +53,14 @@ $xml = << XML; + $dom = new DOMDocument(); $dom->loadXML($xml); + $root = $dom->documentElement; $child1 = $root->firstElementChild; $child2 = $child1->nextElementSibling; + var_dump($root->compareDocumentPosition($child1)); var_dump($child2->compareDocumentPosition($child1)); ?> @@ -92,4 +95,4 @@ End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 ---> \ No newline at end of file +-->