[24] DOM、HTML、XML、XDM、SGML 特性集合における節点は、 マーク付け言語やそれに対応するデータモデルにおける木やグラフの構造における情報の単位です。
[1] Node
界面は、 DOM で最も重要なデータ型です。
これは文書木中の一つの節を表します。
(但し実際的には Node
型そのものの節の実現値は存在せず、 Node
を継承した、例えば Element
型の節として存在します。)
[2] Node
界面の method などの中には、
特定種類の節に対しては意味を成さないものもあります。
そうしたものは null
や例外が返されるかもしれません。
(それぞれ個々の場合ごとに決まっています。)
[13] Node
インターフェイスは
EventTarget
インターフェイスを継承しています。
[14] Node
インターフェイスを継承した主たるインターフェイスとして
ParentNode
と ChildNode
があります。 DOM Standard で定義されている節点はすべてこのいずれか(のみ)を継承しています。
method | replaceChild | 子節を置換 | [DOM1] |
method | removeChild | 子節を削除 | [DOM1] |
swapNode | DOMNode (Trident) | ||
method | appendChild | 子節を付加 | [DOM1] |
method | hasChildNodes | 子節を持つか | [DOM1] |
method | hasAttributes | 属性を持つか | [DOM2] |
method | cloneNode | 節を複製 | [DOM1] |
method | normalize | 正規化 | [DOM2] |
method | isSupported | 機能対応有無 | [DOM2] |
Node
の集まりの型として、 NodeList
と NamedNodeMap
があります。normalize
は、 DOM 1
では界面 Element
で定義されていたものが DOM 2
で移動してきました。Node
で定義されている (nodeValue
とか。) のを見ると、どうやら複数の継承先で定義するよりはまとめて単一の継承元で定義しとこうという考えなのでしょう。Interface NodeExtended Attributes isBlankNode of type boolean Whether the node is blank or not. @@ What is _blank_? How different from "hasChildNodes"? Source: PHP offset of type long The child index of the node within its parent. (?? If the node does not have a parent, "-1" is returned. If the node is the first child, "0" is returned. ??) Source: eDOM parentElement of type Element Nearest ancestor or self node which is an element node. (?? If there is no ancestor or self node whose type is element, the value is "null". ??) (?? For Attr, ? is returned. ??) Source: WinIE, Safari, eDOM removeChildOnly Replaces a child node by its children. In other word, removes a node but not the descendants of that node. Source: eDOM [defined for Element] Parameters oldChild of type Node A node to remove. Return Value Node "oldChild" is returned. Exceptions DOMException HIERARCHY_ERR, NO_MODIFICATION_ALLOWED_ERR replaceChildOnly Replaces a child node by another node and moves the children of the original node into the new node. Attributes of the original node are copied to the new one if the nodes are elements. (?? oldChild and newChild is different type ??) Source: eDOM [defined for Element] Parameters oldChild of type Node Child node to replace. (?? childToReplace in eDOM ??) newChild of type Node New child node to replace by. (?? newChildName (XHTML local element type name) of type DOMString in eDOM ??) Methods addNamespace Adds a namespace declaration attribute to a node. @@ What if already exist? overwrites? Source: PHP Parameters namespaceURI of type DOMString prefix of type DOMString No Return Value descendant Returns whether a node is ancestor of the node. Source: eDOM Parameters possibleAncestor of type Node A node that could be the ancestor of this node. (?? eDOM restricts to "element node". ??) Return Value boolean "true" if "possibleAncestor" is the ancestor of this node; "false" otherwise. (?? "false" if "possibleAncestor" is this node itself. ??) No Exceptions
[8] IE6 はノードに追加したオレオレプロパティが消せない(delete document.body.hoge が出来ない) - latest log ( 版) <http://d.hatena.ne.jp/uupaa/20090924/1253734273>
[16] 911477 – Implement DOM4 methods: prepend(), append(), before(), after() and replace() ( ( 版)) <https://bugzilla.mozilla.org/show_bug.cgi?id=911477>
[9] XML Path Language (XPath) 2.0 (Second Edition) ( ( 版)) <http://www.w3.org/TR/2010/REC-xpath20-20101214/#dt-node>
[10] XQuery 3.0: An XML Query Language ( ( 版)) <http://www.w3.org/TR/xquery-30/#dt-node>
[11] XML Path Language (XPath) 3.0 ( ( 版)) <http://www.w3.org/TR/xpath-30/#dt-node>
[12] XQuery and XPath Data Model 3.0 ( ( 版)) <http://www.w3.org/TR/xpath-datamodel-3/#Node>
[23] ISO/IEC 10744:1997 3.80 >>21 (原文は英語)
[17] JIS X 4153:1998 4.19
[18] 節点は、特性割当ての順序付き集合です。 節点の各特性割当ては特性名を値と関連付けます。 ここで、特性名は節点の級種が提供する特性の名前であり、 その順序が特性割当ての順序となります。
[19] 節点は、ある特性に値を関連付ける特性割当てを持つ時、 その特性に値を示すといいます。 節点の特性とは、 その節点が値を示す特性のことを言います。 節点はその特性の所有者であると言います。
[26] XML情報集合では、節点のことを情報項目と呼んでいます。
[28] 情報項目は、XML文書の一部を抽象的に説明するものです >>25。
[27] 情報集合は、数々の情報項目によって構成されます。 整形式 XML文書の情報集合は、最低でも文書情報項目を含みます。 >>25
[32] 19007 – Consider adding a swap() method ( 版) <https://www.w3.org/Bugs/Public/show_bug.cgi?id=19007>
[37] Make Attr inherit from Node again (annevk著, ) <https://github.com/whatwg/dom/commit/625a0747f137454c155a7b577a9e45be1aa35a34>
[38] Editorial: define more in terms of the length concept (annevk著, ) <https://github.com/whatwg/dom/commit/74ebe9ff443196aa5913d101cdf87ee9274722e2>
Node
を継承していて今は継承していないAttr
と、 DOM3 まではあって今は廃止されたEntity
,EntityReference
,Notation
,XPathNamespace
、 DOMDTDEF (非標準) のElementTypeDefinition
,AttributeDefinition
はどちらも継承していません。 DOM3 まであって DOM Standard で廃止されたCDATASection
はText
を継承しているので、 (仮に現在もあれば)ChildNode
を継承することになります。