From c70f9a722f822239cf7ae0d1b0bdf72c739b05ff Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 13:38:50 +0100
Subject: [PATCH 01/45] Reference new Dom class from XSL
---
.../xsl/xsltprocessor/importstylesheet.xml | 9 ++-
.../xsl/xsltprocessor/transformtodoc.xml | 53 +++++++++++++-
.../xsl/xsltprocessor/transformtouri.xml | 48 ++++++++++++-
.../xsl/xsltprocessor/transformtoxml.xml | 71 +++++++++++++++----
4 files changed, 161 insertions(+), 20 deletions(-)
diff --git a/reference/xsl/xsltprocessor/importstylesheet.xml b/reference/xsl/xsltprocessor/importstylesheet.xml
index 5b44a72c5411..3e02bb1a5b07 100644
--- a/reference/xsl/xsltprocessor/importstylesheet.xml
+++ b/reference/xsl/xsltprocessor/importstylesheet.xml
@@ -24,7 +24,8 @@
stylesheet
- The imported style sheet as a DOMDocument or
+ The imported style sheet as a Dom\Document,
+ DOMDocument or
SimpleXMLElement object.
@@ -58,6 +59,12 @@
+
+ 8.4.0
+
+ Added support for Dom\Document.
+
+ 8.4.0
diff --git a/reference/xsl/xsltprocessor/transformtodoc.xml b/reference/xsl/xsltprocessor/transformtodoc.xml
index 1e0893cb64e8..61839e3063b9 100644
--- a/reference/xsl/xsltprocessor/transformtodoc.xml
+++ b/reference/xsl/xsltprocessor/transformtodoc.xml
@@ -26,7 +26,7 @@
document
- The DOMDocument or SimpleXMLElement or libxml-compatible
+ The Dom\Document, DOMDocument, SimpleXMLElement or libxml-compatible
object to be transformed.
@@ -51,11 +51,34 @@
The resulting document or &false; on error.
+
+
+ &reftitle.changelog;
+
+
+
+
+ &Version;
+ &Description;
+
+
+
+
+ 8.4.0
+
+ Added support for Dom\Document.
+
+
+
+
+
+
+
&reftitle.examples;
- Transforming to a DOMDocument
+ Transforming to a DOMDocument
importStyleSheet($xsl); // attach the xsl rules
echo trim($proc->transformToDoc($xml)->firstChild->wholeText);
+?>
+]]>
+
+ &example.outputs;
+
+
+
+
+
+ Transforming to a Dom\Document
+
+importStyleSheet($xsl); // attach the xsl rules
+
+echo trim($proc->transformToDoc($xml)->firstChild->wholeText);
+
?>
]]>
@@ -85,6 +133,7 @@ Hey! Welcome to Nicolas Eliaszewicz's sweet CD collection!
+
&reftitle.seealso;
diff --git a/reference/xsl/xsltprocessor/transformtouri.xml b/reference/xsl/xsltprocessor/transformtouri.xml
index e589075bbc0d..550daecad4a4 100644
--- a/reference/xsl/xsltprocessor/transformtouri.xml
+++ b/reference/xsl/xsltprocessor/transformtouri.xml
@@ -25,8 +25,8 @@
document
- The DOMDocument or SimpleXMLElement object to
- be transformed.
+ The Dom\Document, DOMDocument, SimpleXMLElement or libxml-compatible
+ object to be transformed.
@@ -41,12 +41,36 @@
+
&reftitle.returnvalues;
Returns the number of bytes written or &false; if an error occurred.
+
+
+ &reftitle.changelog;
+
+
+
+
+ &Version;
+ &Description;
+
+
+
+
+ 8.4.0
+
+ Added support for Dom\Document.
+
+
+
+
+
+
+
&reftitle.examples;
@@ -69,12 +93,32 @@ $proc->importStyleSheet($xsl); // attach the xsl rules
$proc->transformToURI($xml, 'file:///tmp/out.html');
+?>
+]]>
+
+
+
+ Transforming to a HTML file using Dom\Document
+
+importStyleSheet($xsl); // attach the xsl rules
+
+$proc->transformToURI($xml, 'file:///tmp/out.html');
+
?>
]]>
+
&reftitle.seealso;
diff --git a/reference/xsl/xsltprocessor/transformtoxml.xml b/reference/xsl/xsltprocessor/transformtoxml.xml
index f49b9f474cea..94a7c830e4d1 100644
--- a/reference/xsl/xsltprocessor/transformtoxml.xml
+++ b/reference/xsl/xsltprocessor/transformtoxml.xml
@@ -1,6 +1,6 @@
-
+XSLTProcessor::transformToXmlTransform to XML
@@ -17,20 +17,9 @@
- &reftitle.parameters;
-
-
-
- document
-
-
- The DOMDocument or SimpleXMLElement object to
- be transformed.
-
-
-
-
-
+
+
+
&reftitle.returnvalues;
@@ -38,6 +27,29 @@
The result of the transformation as a string or &false; on error.
+
+
+ &reftitle.changelog;
+
+
+
+
+ &Version;
+ &Description;
+
+
+
+
+ 8.4.0
+
+ Added support for Dom\Document.
+
+
+
+
+
+
+
&reftitle.examples;
@@ -68,6 +80,34 @@ echo $proc->transformToXML($xml);
Fight for your mind
by Ben Harper - 1995
+
Electric Ladyland
by Jimi Hendrix - 1997
+]]>
+
+
+
+ Transforming to a string using Dom\Document
+
+importStyleSheet($xsl); // attach the xsl rules
+
+echo $proc->transformToXML($xml);
+
+?>
+]]>
+
+ &example.outputs;
+
+Fight for your mind
by Ben Harper - 1995
Electric Ladyland
by Jimi Hendrix - 1997
]]>
@@ -75,6 +115,7 @@ Hey! Welcome to Nicolas Eliaszewicz's sweet CD collection!
+
&reftitle.seealso;
From 3c12aa3490e5955d847f02da7d83bfa93022ac89 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 13:41:21 +0100
Subject: [PATCH 02/45] Reference new Dom class in SimpleXML
---
.../functions/simplexml-import-dom.xml | 28 ++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/reference/simplexml/functions/simplexml-import-dom.xml b/reference/simplexml/functions/simplexml-import-dom.xml
index 4f2604960330..af8443dbadc4 100644
--- a/reference/simplexml/functions/simplexml-import-dom.xml
+++ b/reference/simplexml/functions/simplexml-import-dom.xml
@@ -72,6 +72,12 @@
+
+ 8.4.0
+
+ Added support for Dom\Document.
+
+ 8.4.0
@@ -89,7 +95,7 @@
&reftitle.examples;
- Importing DOM
+ Importing a DOMDocument
book[0]->title;
+?>
+]]>
+
+ &example.outputs;
+
+
+
+
+
+ Importing a Dom\Document
+
+blah');
+
+$s = simplexml_import_dom($dom);
+
echo $s->book[0]->title;
?>
]]>
From b697303cbc223c8e35857b33775b2b68afdfa42f Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 13:54:51 +0100
Subject: [PATCH 03/45] Document Dom\import_simplexml
---
.../dom/functions/dom-import-simplexml.xml | 2 +-
.../dom/functions/dom-ns-import-simplexml.xml | 93 +++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 95 insertions(+), 1 deletion(-)
create mode 100644 reference/dom/functions/dom-ns-import-simplexml.xml
diff --git a/reference/dom/functions/dom-import-simplexml.xml b/reference/dom/functions/dom-import-simplexml.xml
index 0ad2db69f7b9..3c2fcdc1b1a2 100644
--- a/reference/dom/functions/dom-import-simplexml.xml
+++ b/reference/dom/functions/dom-import-simplexml.xml
@@ -4,7 +4,7 @@
dom_import_simplexml
- Gets a DOMElement object from a
+ Gets a DOMAttr or DOMElement object from a
SimpleXMLElement object
diff --git a/reference/dom/functions/dom-ns-import-simplexml.xml b/reference/dom/functions/dom-ns-import-simplexml.xml
new file mode 100644
index 000000000000..c8ae4cc1f324
--- /dev/null
+++ b/reference/dom/functions/dom-ns-import-simplexml.xml
@@ -0,0 +1,93 @@
+
+
+
+
+ Dom\import_simplexml
+
+ Gets a Dom\Attr or Dom\Element object from a
+ SimpleXMLElement object
+
+
+
+ &reftitle.description;
+
+ Dom\AttrDom\ElementDom\import_simplexml
+ objectnode
+
+
+ This function takes the given attribute or element node (a
+ SimpleXMLElement instance) and creates a
+ Dom\Attr or Dom\Element node, repectively.
+ The new Dom\Node refers to the same underlying XML node
+ as the SimpleXMLElement.
+
+
+
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ The Dom\Attr or Dom\Element.
+
+
+
+
+ &reftitle.examples;
+
+ Import SimpleXML into DOM and modify SimpleXML through DOM
+
+ Error handling omitted for brevity.
+
+
+blah');
+$elt = Dom\import_simplexml($sxe);
+$elt->setAttribute("foo", "bar");
+echo $sxe->asXML();
+
+?>
+]]>
+
+ &example.outputs;
+
+
+blah
+]]>
+
+
+
+
+ &reftitle.seealso;
+
+ simplexml_import_dom
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 33075c62c4ff..8e98f783ae24 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -200,6 +200,7 @@
+
From e8d30ee10146d6bacd544617b1b404184621575f Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 13:55:07 +0100
Subject: [PATCH 04/45] Remove unused version entries from dom/versions.xml
---
reference/dom/versions.xml | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 8e98f783ae24..77106bc03e8d 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -201,18 +201,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
- The DOMException class
+ The DOMException / Dom\Exception classDOMException
@@ -17,10 +17,14 @@ FIXME: Remove me once you perform substitutions
&reftitle.intro;
-
+
DOM operations raise exceptions under particular circumstances, i.e.,
when an operation is impossible to perform for logical reasons.
-
+
+
+ This class is aliased as Dom\Exception in the
+ Dom namespace.
+
See also .
From 10f097fd9486e5a6a11147b5a99f0972de8af2de Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 14:18:34 +0100
Subject: [PATCH 08/45] Document Dom\AdjacentPosition
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-adjacentposition.xml | 76 ++++++++++++++++++++++
2 files changed, 77 insertions(+)
create mode 100644 reference/dom/dom/dom-adjacentposition.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index d8933f94eab8..18b696a3822a 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -41,6 +41,7 @@
&reference.dom.domprocessinginstruction;
&reference.dom.domtext;
&reference.dom.domxpath;
+ &reference.dom.dom.dom-adjacentposition;
From 5bc5b823f101d2e35a56049e0eb9e6f01eb80d2d Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 14:24:40 +0100
Subject: [PATCH 09/45] Reference new DOM classes in loadHTML(File)
---
language-snippets.ent | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/language-snippets.ent b/language-snippets.ent
index 23711bc4abcb..e95b222b207e 100644
--- a/language-snippets.ent
+++ b/language-snippets.ent
@@ -1650,28 +1650,32 @@ it is inserted with (e.g.) DOMNo
The DOM extension uses UTF-8 encoding. Use mb_convert_encoding, UConverter::transcode, or iconv to handle other encodings.'>
When using json_encode on a DOMDocument object the result will be that of encoding an empty object.'>
-
+
+ Use Dom\HTMLDocument to parse and process modern HTML
+ instead of DOMDocument.
+
+
This function parses the input using an HTML 4 parser. The parsing rules
of HTML 5, which is what modern web browsers use, are different. Depending
on the input this might result in a different DOM structure. Therefore
this function cannot be safely used for sanitizing HTML.
-
-
+
+
The behavior when parsing HTML can depend on the version of
libxml that is being used, particularly with regards to
edge conditions and error handling.
For parsing that conforms to the HTML5 specification,
use Dom\HTMLDocument::createFromString or
Dom\HTMLDocument::createFromFile, added in PHP 8.4.
-
-
+
+
As an example, some HTML elements will implicitly close a parent element
when encountered. The rules for automatically closing parent elements
differ between HTML 4 and HTML 5 and thus the resulting DOM structure that
DOMDocument sees might be different from the DOM
structure a web browser sees, possibly allowing an attacker to break the
resulting HTML.
-
+
'>
From 011501c6e2c185af5626b28cac5dd1c92fa15a04 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 16:26:52 +0100
Subject: [PATCH 10/45] Document Dom\Node class
---
reference/dom/book.xml | 2 +
reference/dom/dom/dom-node.xml | 310 +++++++++++++++++++++++++++++++++
reference/dom/versions.xml | 2 +
3 files changed, 314 insertions(+)
create mode 100644 reference/dom/dom/dom-node.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index 18b696a3822a..ec5289b7541e 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -41,7 +41,9 @@
&reference.dom.domprocessinginstruction;
&reference.dom.domtext;
&reference.dom.domxpath;
+
&reference.dom.dom.dom-adjacentposition;
+ &reference.dom.dom.dom-node;
+
+ The Dom\Node class
+ Dom\Node
+
+
+
+
+ &reftitle.intro;
+
+ This is the modern, spec-compliant equivalent of
+ DOMNode.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+ Dom\Node
+
+
+ &Constants;
+
+ public
+ const
+ int
+ Dom\Node::DOCUMENT_POSITION_DISCONNECTED
+ 0x1
+
+
+ public
+ const
+ int
+ Dom\Node::DOCUMENT_POSITION_PRECEDING
+ 0x2
+
+
+ public
+ const
+ int
+ Dom\Node::DOCUMENT_POSITION_FOLLOWING
+ 0x4
+
+
+ public
+ const
+ int
+ Dom\Node::DOCUMENT_POSITION_CONTAINS
+ 0x8
+
+
+ public
+ const
+ int
+ Dom\Node::DOCUMENT_POSITION_CONTAINED_BY
+ 0x10
+
+
+ public
+ const
+ int
+ Dom\Node::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC
+ 0x20
+
+
+ &Properties;
+
+ public
+ readonly
+ int
+ nodeType
+
+
+ public
+ readonly
+ string
+ nodeName
+
+
+ public
+ readonly
+ string
+ baseURI
+
+
+ public
+ readonly
+ bool
+ isConnected
+
+
+ public
+ readonly
+ Dom\Documentnull
+ ownerDocument
+
+
+ public
+ readonly
+ Dom\Nodenull
+ parentNode
+
+
+ public
+ readonly
+ Dom\Elementnull
+ parentElement
+
+
+ public
+ readonly
+ Dom\NodeList
+ childNodes
+
+
+ public
+ readonly
+ Dom\Nodenull
+ firstChild
+
+
+ public
+ readonly
+ Dom\Nodenull
+ lastChild
+
+
+ public
+ readonly
+ Dom\Nodenull
+ previousSibling
+
+
+ public
+ readonly
+ Dom\Nodenull
+ nextSibling
+
+
+ public
+ stringnull
+ nodeValue
+
+
+ public
+ stringnull
+ textContent
+
+
+ &Methods;
+
+
+
+
+
+
+
+
+
+
+
+ &reftitle.constants;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+
+
+
+
+
+ nodeName
+
+ Returns the most accurate name for the current node type.
+
+ For elements, this is the HTML-uppercased qualified name.
+ For attributes, this is the qualified name.
+ For processing instructions, this is the target.
+ For document type nodes, this is the name.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ownerDocument
+
+
+ The Dom\Document object associated with
+ this node, or &null; if this node is a document.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ childNodes
+
+
+ A Dom\NodeList that contains all
+ children of this node. If there are no children, this is an empty
+ Dom\NodeList.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ nodeValue
+
+
+ The value of this node, depending on its type.
+
+
+
+
+
+
+
+
+
+
+
+
+ &reftitle.notes;
+ &dom.note.utf8;
+
+
+
+ &reftitle.seealso;
+
+ WHATWG specification of Node
+
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 77106bc03e8d..a97dfe759715 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -201,6 +201,8 @@
+
+
+
+ The Dom\Implementation class
+ Dom\Implementation
+
+
+
+
+ &reftitle.intro;
+
+
+
+
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMImplementation.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+ Dom\Implementation
+
+
+ &Methods;
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/domimplementation.xml b/reference/dom/domimplementation.xml
index ce1cbfa6a294..b3d169af6b6e 100644
--- a/reference/dom/domimplementation.xml
+++ b/reference/dom/domimplementation.xml
@@ -15,11 +15,11 @@ Remove me once you perform substitutions
&reftitle.intro;
-
- The DOMImplementation class provides a number
+
+ This class provides a number
of methods for performing operations that are independent of any
particular instance of the document object model.
-
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index a97dfe759715..5ad5abc84566 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -203,6 +203,7 @@
+
+
+ The Dom\Attr class
+ Dom\Attr
+
+
+
+
+ &reftitle.intro;
+
+ Dom\Attr represents an attribute in the
+ Dom\Element object.
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMAttr.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+ Dom\Attr
+
+
+
+ extends
+ Dom\Node
+
+
+ &InheritedConstants;
+
+
+
+
+ &Properties;
+
+ public
+ readonly
+ stringnull
+ namespaceURI
+
+
+ public
+ readonly
+ stringnull
+ prefix
+
+
+ public
+ readonly
+ string
+ localName
+
+
+ public
+ readonly
+ string
+ name
+
+
+ public
+ string
+ value
+
+
+ public
+ readonly
+ Dom\Elementnull
+ ownerElement
+
+
+ public
+ readonly
+ bool
+ specified
+
+
+ &InheritedProperties;
+
+
+
+
+ &Methods;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+ namespaceURI
+
+ The namespace URI of the attribute.
+
+
+
+ prefix
+
+ The namespace prefix of the attribute.
+
+
+
+ localName
+
+ The local name of the attribute.
+
+
+
+ name
+
+ The qualified name of the attribute.
+
+
+
+ value
+
+ The value of the attribute.
+
+
+ Unlike the equivalent property in DOMAttr,
+ this does not substitute entities.
+
+
+
+
+
+ ownerElement
+
+ The element that contains the attribute or &null;.
+
+
+
+ specified
+
+ Legacy option, always is &true;.
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ WHATWG specification of Attr
+
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 5ad5abc84566..465bed2379d1 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -202,6 +202,7 @@
+
From 627b2bf3f00ba007d8440b61fc8eb55757fd7941 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 17:02:38 +0100
Subject: [PATCH 13/45] Document Dom\DocumentType class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-documenttype.xml | 142 +++++++++++++++++++++++++
reference/dom/domdocumenttype.xml | 8 +-
reference/dom/versions.xml | 1 +
4 files changed, 148 insertions(+), 4 deletions(-)
create mode 100644 reference/dom/dom/dom-documenttype.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index be8231bd2275..9cdb64c41246 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -44,6 +44,7 @@
&reference.dom.dom.dom-adjacentposition;
&reference.dom.dom.dom-attr;
+ &reference.dom.dom.dom-documenttype;
&reference.dom.dom.dom-implementation;
&reference.dom.dom.dom-node;
diff --git a/reference/dom/dom/dom-documenttype.xml b/reference/dom/dom/dom-documenttype.xml
new file mode 100644
index 000000000000..2d44c3f3103f
--- /dev/null
+++ b/reference/dom/dom/dom-documenttype.xml
@@ -0,0 +1,142 @@
+
+
+
+ The Dom\DocumentType class
+ Dom\DocumentType
+
+
+
+ &reftitle.intro;
+
+ Each Dom\Document has a doctype
+ attribute whose value is either &null; or a Dom\DocumentType object.
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMImplementation.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+ Dom\DocumentType
+
+
+
+ extends
+ Dom\Node
+
+
+
+ implements
+ Dom\ChildNode
+
+
+ &InheritedConstants;
+
+
+
+
+ &Properties;
+
+ public
+ readonly
+ string
+ name
+
+
+ public
+ readonly
+ Dom\DtdNamedNodeMap
+ entities
+
+
+ public
+ readonly
+ Dom\DtdNamedNodeMap
+ notations
+
+
+ public
+ readonly
+ string
+ publicId
+
+
+ public
+ readonly
+ string
+ systemId
+
+
+ public
+ readonly
+ stringnull
+ internalSubset
+
+
+ &InheritedProperties;
+
+
+
+
+ &Methods;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ entities
+
+
+ A Dom\DtdNamedNodeMap containing the general
+ entities, both external and internal, declared in the DTD.
+
+
+
+
+ notations
+
+
+ A Dom\DtdNamedNodeMap containing the notations
+ declared in the DTD.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/domdocumenttype.xml b/reference/dom/domdocumenttype.xml
index b24121830dfd..fe8545816ab8 100644
--- a/reference/dom/domdocumenttype.xml
+++ b/reference/dom/domdocumenttype.xml
@@ -102,7 +102,7 @@
The system identifier of the external subset. This may be an
- absolute URI or not.
+ absolute URI or not.
@@ -110,7 +110,7 @@
name
- The name of DTD; i.e., the name immediately following the
+ The name of DTD; i.e., the name immediately following the
DOCTYPE keyword.
@@ -120,7 +120,7 @@
A DOMNamedNodeMap containing the general
- entities, both external and internal, declared in the DTD.
+ entities, both external and internal, declared in the DTD.
@@ -129,7 +129,7 @@
A DOMNamedNodeMap containing the notations
- declared in the DTD.
+ declared in the DTD.
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 465bed2379d1..7eb8b1fd9046 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -203,6 +203,7 @@
+
From 37ef48f6d2886ecd2a065f29b26936b63a494d3b Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 17:14:23 +0100
Subject: [PATCH 14/45] Document Dom\NamespaceInfo class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-namespaceinfo.xml | 74 +++++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 76 insertions(+)
create mode 100644 reference/dom/dom/dom-namespaceinfo.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index 9cdb64c41246..daf3f0acb170 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -46,6 +46,7 @@
&reference.dom.dom.dom-attr;
&reference.dom.dom.dom-documenttype;
&reference.dom.dom.dom-implementation;
+ &reference.dom.dom.dom-namespaceinfo;
&reference.dom.dom.dom-node;
+
+ The Dom\NamespaceInfo class
+ Dom\NamespaceInfo
+
+
+
+ &reftitle.intro;
+
+ This represents immutable information about namespaces of an element.
+ This decouples namespaces from attributes, which was incorrectly intertwined for the old DOM classes.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+ final
+ readonly
+ Dom\NamespaceInfo
+
+
+ &Properties;
+
+ public
+ stringnull
+ prefix
+
+
+ public
+ stringnull
+ namespaceURI
+
+
+ public
+ Dom\Element
+ element
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+ prefix
+
+ The namespace prefix of the attribute.
+
+
+
+ namespaceURI
+
+ The namespace URI of the attribute.
+
+
+
+ element
+
+ The element that this namespace information is about.
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 7eb8b1fd9046..f6e8bd871dfc 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -204,6 +204,7 @@
+
From 1cc1ab001461b5954d1cbc49bd5ce45090266899 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 17:19:17 +0100
Subject: [PATCH 15/45] Document Dom\Entity class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-entity.xml | 89 ++++++++++++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 91 insertions(+)
create mode 100644 reference/dom/dom/dom-entity.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index daf3f0acb170..f2b2c2b4008a 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -45,6 +45,7 @@
&reference.dom.dom.dom-adjacentposition;
&reference.dom.dom.dom-attr;
&reference.dom.dom.dom-documenttype;
+ &reference.dom.dom.dom-entity;
&reference.dom.dom.dom-implementation;
&reference.dom.dom.dom-namespaceinfo;
&reference.dom.dom.dom-node;
diff --git a/reference/dom/dom/dom-entity.xml b/reference/dom/dom/dom-entity.xml
new file mode 100644
index 000000000000..3158329782eb
--- /dev/null
+++ b/reference/dom/dom/dom-entity.xml
@@ -0,0 +1,89 @@
+
+
+
+ The Dom\Entity class
+ Dom\Entity
+
+
+
+
+
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMEntity.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+ Dom\Entity
+
+
+
+ extends
+ Dom\Node
+
+
+ &InheritedConstants;
+
+
+
+
+ &Properties;
+
+ public
+ readonly
+ stringnull
+ publicId
+
+
+ public
+ readonly
+ stringnull
+ systemId
+
+
+ public
+ readonly
+ stringnull
+ notationName
+
+
+ &InheritedProperties;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index f6e8bd871dfc..d563d0002b2f 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -204,6 +204,7 @@
+
From d11e8f1065c62b583577cba723a405e6b1fa62a0 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 17:26:36 +0100
Subject: [PATCH 16/45] Document Dom\Notation class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-notation.xml | 70 ++++++++++++++++++++++++++++++
reference/dom/domnotation.xml | 5 +--
reference/dom/versions.xml | 1 +
4 files changed, 74 insertions(+), 3 deletions(-)
create mode 100644 reference/dom/dom/dom-notation.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index f2b2c2b4008a..3b7ef411a13f 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -49,6 +49,7 @@
&reference.dom.dom.dom-implementation;
&reference.dom.dom.dom-namespaceinfo;
&reference.dom.dom.dom-node;
+ &reference.dom.dom.dom-notation;
+
+ The Dom\Notation class
+ Dom\Notation
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+ Dom\Notation
+
+
+
+ extends
+ Dom\Node
+
+
+ &InheritedConstants;
+
+
+
+
+ &Properties;
+
+ public
+ readonly
+ string
+ publicId
+
+
+ public
+ readonly
+ string
+ systemId
+
+
+ &InheritedProperties;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/domnotation.xml b/reference/dom/domnotation.xml
index 1fea3eb76fa5..a437bd0c5aaf 100644
--- a/reference/dom/domnotation.xml
+++ b/reference/dom/domnotation.xml
@@ -74,21 +74,20 @@ Remove me once you perform substitutions
-
&reftitle.properties;
publicId
-
+ The public identifier associated with the notation.systemId
-
+ The system identifier associated with the notation.
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index d563d0002b2f..b079a79144e1 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -207,6 +207,7 @@
+
+
+
+ The Dom\CDATASection class
+ Dom\CDATASection
+
+
+
+
+ &reftitle.intro;
+
+ The Dom\CDATASection class inherits from
+ Dom\Text for textual representation
+ of CData constructs.
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMCdataSection.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+ Dom\CDATASection
+
+
+
+ extends
+ Dom\Text
+
+
+ &InheritedConstants;
+
+
+
+
+ &InheritedProperties;
+
+
+
+
+
+
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/domcdatasection.xml b/reference/dom/domcdatasection.xml
index e70756d6c84d..14cb8312f964 100644
--- a/reference/dom/domcdatasection.xml
+++ b/reference/dom/domcdatasection.xml
@@ -11,7 +11,7 @@
&reftitle.intro;
- The DOMCdataSection inherits from
+ The DOMCdataSection class inherits from
DOMText for textual representation
of CData constructs.
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index b079a79144e1..6df9d4faf7cc 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -203,6 +203,7 @@
+
From e9494b40ae293b7f25fc6b59290bd1ef8f1190ae Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 17:51:40 +0100
Subject: [PATCH 18/45] Fix encoding mistakes in DOM
---
reference/dom/domcharacterdata/deletedata.xml | 2 +-
reference/dom/domcharacterdata/insertdata.xml | 4 ++--
reference/dom/domcharacterdata/replacedata.xml | 2 +-
reference/dom/domcharacterdata/substringdata.xml | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/reference/dom/domcharacterdata/deletedata.xml b/reference/dom/domcharacterdata/deletedata.xml
index fba6fb888242..49849775479a 100644
--- a/reference/dom/domcharacterdata/deletedata.xml
+++ b/reference/dom/domcharacterdata/deletedata.xml
@@ -59,7 +59,7 @@
Raised if offset is negative or greater than the
- number of 16-bit units in data, or if count is
+ number of UTF-8 codepoints in data, or if count is
negative.
diff --git a/reference/dom/domcharacterdata/insertdata.xml b/reference/dom/domcharacterdata/insertdata.xml
index 0313d4947748..0287ed3c685f 100644
--- a/reference/dom/domcharacterdata/insertdata.xml
+++ b/reference/dom/domcharacterdata/insertdata.xml
@@ -4,7 +4,7 @@
DOMCharacterData::insertData
- Insert a string at the specified 16-bit unit offset
+ Insert a string at the specified UTF-8 codepoint offset
@@ -56,7 +56,7 @@
Raised if offset is negative or greater than the
- number of 16-bit units in data.
+ number of UTF-8 codepoints in data.
diff --git a/reference/dom/domcharacterdata/replacedata.xml b/reference/dom/domcharacterdata/replacedata.xml
index 8e408ddc46f6..5db78ab40181 100644
--- a/reference/dom/domcharacterdata/replacedata.xml
+++ b/reference/dom/domcharacterdata/replacedata.xml
@@ -68,7 +68,7 @@
Raised if offset is negative or greater than the
- number of 16-bit units in data, or if count is
+ number of UTF-8 codepoints in data, or if count is
negative.
diff --git a/reference/dom/domcharacterdata/substringdata.xml b/reference/dom/domcharacterdata/substringdata.xml
index 78c7c7ae6e7e..7c11b6897bbe 100644
--- a/reference/dom/domcharacterdata/substringdata.xml
+++ b/reference/dom/domcharacterdata/substringdata.xml
@@ -45,7 +45,7 @@
&reftitle.returnvalues;
The specified substring. If the sum of offset
- and count exceeds the length, then all 16-bit units
+ and count exceeds the length, then all UTF-8 codepoints
to the end of the data are returned.
@@ -58,7 +58,7 @@
Raised if offset is negative or greater than the
- number of 16-bit units in data, or if count is
+ number of UTF-8 codepoints in data, or if count is
negative.
From a2d2a140bc88f59ff39bf0c093208954ab097380 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 18:00:20 +0100
Subject: [PATCH 19/45] Document Dom\CharacterData class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-characterdata.xml | 120 ++++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 122 insertions(+)
create mode 100644 reference/dom/dom/dom-characterdata.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index fed52b63e43d..0c6772e42c78 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -45,6 +45,7 @@
&reference.dom.dom.dom-adjacentposition;
&reference.dom.dom.dom-attr;
&reference.dom.dom.dom-cdatasection;
+ &reference.dom.dom.dom-characterdata;
&reference.dom.dom.dom-documenttype;
&reference.dom.dom.dom-entity;
&reference.dom.dom.dom-implementation;
diff --git a/reference/dom/dom/dom-characterdata.xml b/reference/dom/dom/dom-characterdata.xml
new file mode 100644
index 000000000000..9231940e6770
--- /dev/null
+++ b/reference/dom/dom/dom-characterdata.xml
@@ -0,0 +1,120 @@
+
+
+
+ The Dom\CharacterData class
+ Dom\CharacterData
+
+
+
+ &reftitle.intro;
+
+
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMCharacterData.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+ Dom\CharacterData
+
+
+
+ extends
+ Dom\Node
+
+
+
+ implements
+ Dom\ChildNode
+
+
+ &InheritedConstants;
+
+
+
+
+ &Properties;
+
+ public
+ readonly
+ Dom\Elementnull
+ previousElementSibling
+
+
+ public
+ readonly
+ Dom\Elementnull
+ nextElementSibling
+
+
+ public
+ string
+ data
+
+
+ public
+ readonly
+ int
+ length
+
+
+ &InheritedProperties;
+
+
+
+
+ &Methods;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ WHATWG specification of CharacterData
+
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 6df9d4faf7cc..987883371548 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -204,6 +204,7 @@
+
From f343484942b6fc31f9038812e7bcf7bdf576ae38 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 18:03:02 +0100
Subject: [PATCH 20/45] Document DOM\ChildNode interface
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-childnode.xml | 35 +++++++++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 37 insertions(+)
create mode 100644 reference/dom/dom/dom-childnode.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index 0c6772e42c78..65a2bff971ac 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -46,6 +46,7 @@
&reference.dom.dom.dom-attr;
&reference.dom.dom.dom-cdatasection;
&reference.dom.dom.dom-characterdata;
+ &reference.dom.dom.dom-childnode;
&reference.dom.dom.dom-documenttype;
&reference.dom.dom.dom-entity;
&reference.dom.dom.dom-implementation;
diff --git a/reference/dom/dom/dom-childnode.xml b/reference/dom/dom/dom-childnode.xml
new file mode 100644
index 000000000000..8bc8dcbe4946
--- /dev/null
+++ b/reference/dom/dom/dom-childnode.xml
@@ -0,0 +1,35 @@
+
+
+ The Dom\ChildNode interface
+ Dom\ChildNode
+
+
+
+
+ &reftitle.intro;
+
+ This is the modern, spec-compliant equivalent of
+ DOMChildNode.
+
+
+
+
+ &reftitle.interfacesynopsis;
+
+
+
+ Dom\ChildNode
+
+
+ &Methods;
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 987883371548..11903eaf38fb 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -205,6 +205,7 @@
+
From a8c02e066c7cac8afa6e317f86cba138c136ec8f Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 18:09:45 +0100
Subject: [PATCH 21/45] Document Dom\Comment class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-comment.xml | 64 +++++++++++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 66 insertions(+)
create mode 100644 reference/dom/dom/dom-comment.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index 65a2bff971ac..e08dcc339de2 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -47,6 +47,7 @@
&reference.dom.dom.dom-cdatasection;
&reference.dom.dom.dom-characterdata;
&reference.dom.dom.dom-childnode;
+ &reference.dom.dom.dom-comment;
&reference.dom.dom.dom-documenttype;
&reference.dom.dom.dom-entity;
&reference.dom.dom.dom-implementation;
diff --git a/reference/dom/dom/dom-comment.xml b/reference/dom/dom/dom-comment.xml
new file mode 100644
index 000000000000..cb3d89bcffff
--- /dev/null
+++ b/reference/dom/dom/dom-comment.xml
@@ -0,0 +1,64 @@
+
+
+
+ The Dom\Comment class
+ Dom\Comment
+
+
+
+
+
+
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMComment.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ Dom\Comment
+
+
+
+ extends
+ Dom\CharacterData
+
+
+ &InheritedConstants;
+
+
+
+
+ &InheritedProperties;
+
+
+
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ WHATWG specification of Comment
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 11903eaf38fb..83a6f9e50b9a 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -206,6 +206,7 @@
+
From 6fc4ae2c69c68d4e1131396e8d3e31bad42e3b58 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 18:14:33 +0100
Subject: [PATCH 22/45] Document Dom\Text class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-text.xml | 83 ++++++++++++++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 85 insertions(+)
create mode 100644 reference/dom/dom/dom-text.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index e08dcc339de2..813ba941037f 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -54,6 +54,7 @@
&reference.dom.dom.dom-namespaceinfo;
&reference.dom.dom.dom-node;
&reference.dom.dom.dom-notation;
+ &reference.dom.dom.dom-text;
+
+ The Dom\Text class
+ Dom\Text
+
+
+
+
+ &reftitle.intro;
+
+ The Dom\Text class inherits from
+ Dom\CharacterData and represents a text node.
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMText.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ Dom\Text
+
+
+
+ extends
+ Dom\CharacterData
+
+
+ &InheritedConstants;
+
+
+
+
+ &Properties;
+
+ public
+ readonly
+ string
+ wholeText
+
+
+ &InheritedProperties;
+
+
+
+
+
+
+
+ &Methods;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 83a6f9e50b9a..1167ff752b97 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -213,6 +213,7 @@
+
+
+ The Dom\DocumentFragment class
+ Dom\DocumentFragment
+
+
+
+
+ &reftitle.intro;
+
+ This represents a document fragment, which can be used as a container for
+ other nodes.
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMDocumentFragment.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ Dom\DocumentFragment
+
+
+
+ extends
+ Dom\Node
+
+
+
+ implements
+ Dom\ParentNode
+
+
+ &InheritedConstants;
+
+
+
+
+ &Properties;
+
+ public
+ readonly
+ Dom\Elementnull
+ firstElementChild
+
+
+ public
+ readonly
+ Dom\Elementnull
+ lastElementChild
+
+
+ public
+ readonly
+ int
+ childElementCount
+
+
+ &InheritedProperties;
+
+
+
+
+ &Methods;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 1167ff752b97..ad8b97fb5bd1 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -207,6 +207,7 @@
+
From 2cf289d16abf58bdef88a9786b671e83a105c22b Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 18:26:07 +0100
Subject: [PATCH 24/45] Document Dom\EntityReference class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-entityreference.xml | 49 +++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 51 insertions(+)
create mode 100644 reference/dom/dom/dom-entityreference.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index 50510396d093..424e4c3fcd4b 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -51,6 +51,7 @@
&reference.dom.dom.dom-documentfragment;
&reference.dom.dom.dom-documenttype;
&reference.dom.dom.dom-entity;
+ &reference.dom.dom.dom-entityreference;
&reference.dom.dom.dom-implementation;
&reference.dom.dom.dom-namespaceinfo;
&reference.dom.dom.dom-node;
diff --git a/reference/dom/dom/dom-entityreference.xml b/reference/dom/dom/dom-entityreference.xml
new file mode 100644
index 000000000000..5b01a743843a
--- /dev/null
+++ b/reference/dom/dom/dom-entityreference.xml
@@ -0,0 +1,49 @@
+
+
+
+ The Dom\EntityReference class
+ Dom\EntityReference
+
+
+
+
+ &reftitle.intro;
+
+ This is the modern, spec-compliant equivalent of
+ DOMEntityReference.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ Dom\EntityReference
+
+
+
+ extends
+ Dom\Node
+
+
+ &InheritedConstants;
+
+
+
+
+ &InheritedProperties;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index ad8b97fb5bd1..2a67b791f47b 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -210,6 +210,7 @@
+
From 6559b2eb4591b16a10e7b694927b20027026f741 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 18:37:27 +0100
Subject: [PATCH 25/45] Document Dom\ProcessingInstruction class
---
reference/dom/book.xml | 1 +
.../dom/dom/dom-processinginstruction.xml | 76 +++++++++++++++++++
reference/dom/domprocessinginstruction.xml | 16 ++--
reference/dom/versions.xml | 1 +
4 files changed, 84 insertions(+), 10 deletions(-)
create mode 100644 reference/dom/dom/dom-processinginstruction.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index 424e4c3fcd4b..d46f3a056ab1 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -53,6 +53,7 @@
&reference.dom.dom.dom-entity;
&reference.dom.dom.dom-entityreference;
&reference.dom.dom.dom-implementation;
+ &reference.dom.dom.dom-processinginstruction;
&reference.dom.dom.dom-namespaceinfo;
&reference.dom.dom.dom-node;
&reference.dom.dom.dom-notation;
diff --git a/reference/dom/dom/dom-processinginstruction.xml b/reference/dom/dom/dom-processinginstruction.xml
new file mode 100644
index 000000000000..e7e58f215a22
--- /dev/null
+++ b/reference/dom/dom/dom-processinginstruction.xml
@@ -0,0 +1,76 @@
+
+
+
+ The Dom\ProcessingInstruction class
+ Dom\ProcessingInstruction
+
+
+
+
+
+
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMProcessingInstruction.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ Dom\ProcessingInstruction
+
+
+
+ extends
+ Dom\CharacterData
+
+
+ &InheritedConstants;
+
+
+
+
+ &Properties;
+
+ public
+ readonly
+ string
+ target
+
+
+ &InheritedProperties;
+
+
+
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/domprocessinginstruction.xml b/reference/dom/domprocessinginstruction.xml
index 310b877b7fc4..aadb785d2c4e 100644
--- a/reference/dom/domprocessinginstruction.xml
+++ b/reference/dom/domprocessinginstruction.xml
@@ -6,16 +6,13 @@
-
-
-
&reftitle.classsynopsis;
@@ -69,21 +66,20 @@
-
&reftitle.properties;
target
-
+ A string representing to what application the data is intended for.data
-
+ Application-specific data.
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 2a67b791f47b..082831dc51f7 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -215,6 +215,7 @@
+
+
+ The Dom\Document class
+ Dom\Document
+
+
+
+
+
+
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMDocument.
+ It is the base class for Dom\XMLDocument
+ and Dom\HTMLDocument.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ abstract
+ Dom\Document
+
+
+
+ extends
+ Dom\Node
+
+
+
+ implements
+ Dom\ParentNode
+
+
+ &InheritedConstants;
+
+
+
+
+ &Properties;
+
+ public
+ readonly
+ Dom\Implementation
+ implementation
+
+
+ public
+ string
+ URL
+
+
+ public
+ string
+ documentURI
+
+
+ public
+ string
+ characterSet
+
+
+ public
+ string
+ charset
+
+
+ public
+ string
+ inputEncoding
+
+
+ public
+ readonly
+ Dom\DocumentTypenull
+ doctype
+
+
+ public
+ readonly
+ Dom\Elementnull
+ documentElement
+
+
+ public
+ readonly
+ Dom\Elementnull
+ firstElementChild
+
+
+ public
+ readonly
+ Dom\Elementnull
+ lastElementChild
+
+
+ public
+ readonly
+ int
+ childElementCount
+
+
+ public
+ Dom\HTMLElementnull
+ body
+
+
+ public
+ readonly
+ Dom\HTMLElementnull
+ head
+
+
+ public
+ string
+ title
+
+
+ &InheritedProperties;
+
+
+
+
+ &Methods;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+
+
+
+
+
+
+
+
+
+
+ URL
+
+ Equivalent to documentURI.
+
+
+
+ characterSet
+
+
+ The encoding of the document used for serialization.
+ Upon parsing a document, this is set to the input encoding of that
+ document.
+
+
+
+
+ inputEncoding
+
+ Legacy alias for characterSet.
+
+
+
+ charset
+
+ Legacy alias for characterSet.
+
+
+
+
+
+
+
+
+ documentElement
+
+
+ The Dom\Element that is the document element.
+ This evaluates to &null; for document without elements.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ body
+
+
+ The first child of the html element that is either a
+ body tag or a frameset tag.
+ These need to be in the HTML namespace.
+ If no element matches, this evaluates to &null;.
+
+
+
+
+ head
+
+
+ The first head element that is a child of the
+ html element.
+ These need to be in the HTML namespace.
+ If no element matches, this evaluates to &null;.
+
+
+
+
+ title
+
+
+ The title of the document as set by the title
+ element for HTML or the SVG title element for SVG.
+ If there is no title, this evaluates to the empty string.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 082831dc51f7..3ba7f2ed8225 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -207,6 +207,7 @@
+
From b3a7ba51baeecde45ea636494f7b9634f11d4d97 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 20:44:47 +0100
Subject: [PATCH 27/45] Document Dom\DtdNamedNodeMap class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-dtdnamednodemap.xml | 67 +++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 69 insertions(+)
create mode 100644 reference/dom/dom/dom-dtdnamednodemap.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index 4784f49cb58d..ab9f7c76ed97 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -51,6 +51,7 @@
&reference.dom.dom.dom-document;
&reference.dom.dom.dom-documentfragment;
&reference.dom.dom.dom-documenttype;
+ &reference.dom.dom.dom-dtdnamednodemap;
&reference.dom.dom.dom-entity;
&reference.dom.dom.dom-entityreference;
&reference.dom.dom.dom-implementation;
diff --git a/reference/dom/dom/dom-dtdnamednodemap.xml b/reference/dom/dom/dom-dtdnamednodemap.xml
new file mode 100644
index 000000000000..925d0cf4c92a
--- /dev/null
+++ b/reference/dom/dom/dom-dtdnamednodemap.xml
@@ -0,0 +1,67 @@
+
+
+
+ The Dom\DtdNamedNodeMap class
+ Dom\DtdNamedNodeMap
+
+
+
+
+ &reftitle.intro;
+
+ Represents a named node map for entities and notation nodes of the
+ DTD.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ Dom\DtdNamedNodeMap
+
+
+
+ implements
+ IteratorAggregate
+
+
+
+ Countable
+
+
+ &Properties;
+
+ public
+ readonly
+ int
+ length
+
+
+ &Methods;
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+ length
+
+
+ The total number of entities and notation nodes.
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 3ba7f2ed8225..1089a52c0035 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -210,6 +210,7 @@
+
From afb06c3355ea7eb691494b424ac9656818ca4714 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 20:57:44 +0100
Subject: [PATCH 28/45] Document Dom\Element class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-element.xml | 256 ++++++++++++++++++++++++++++++
reference/dom/domelement.xml | 4 +-
reference/dom/versions.xml | 1 +
4 files changed, 260 insertions(+), 2 deletions(-)
create mode 100644 reference/dom/dom/dom-element.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index ab9f7c76ed97..bc8391e348cd 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -52,6 +52,7 @@
&reference.dom.dom.dom-documentfragment;
&reference.dom.dom.dom-documenttype;
&reference.dom.dom.dom-dtdnamednodemap;
+ &reference.dom.dom.dom-element;
&reference.dom.dom.dom-entity;
&reference.dom.dom.dom-entityreference;
&reference.dom.dom.dom-implementation;
diff --git a/reference/dom/dom/dom-element.xml b/reference/dom/dom/dom-element.xml
new file mode 100644
index 000000000000..f3594d65bd67
--- /dev/null
+++ b/reference/dom/dom/dom-element.xml
@@ -0,0 +1,256 @@
+
+
+
+ The Dom\Element class
+ Dom\Element
+
+
+
+
+ &reftitle.intro;
+
+ Represents an element.
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMElement.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ Dom\Element
+
+
+
+ extends
+ Dom\Node
+
+
+
+ implements
+ Dom\ParentNode
+
+
+
+ Dom\ChildNode
+
+
+ &InheritedConstants;
+
+
+
+
+ &Properties;
+
+ public
+ readonly
+ stringnull
+ namespaceURI
+
+
+ public
+ readonly
+ stringnull
+ prefix
+
+
+ public
+ readonly
+ string
+ localName
+
+
+ public
+ readonly
+ string
+ tagName
+
+
+ public
+ string
+ id
+
+
+ public
+ string
+ className
+
+
+ public
+ readonly
+ Dom\TokenList
+ classList
+
+
+ public
+ readonly
+ Dom\NamedNodeMap
+ attributes
+
+
+ public
+ readonly
+ Dom\Elementnull
+ firstElementChild
+
+
+ public
+ readonly
+ Dom\Elementnull
+ lastElementChild
+
+
+ public
+ readonly
+ int
+ childElementCount
+
+
+ public
+ readonly
+ Dom\Elementnull
+ previousElementSibling
+
+
+ public
+ readonly
+ Dom\Elementnull
+ nextElementSibling
+
+
+ public
+ string
+ innerHTML
+
+
+ public
+ string
+ substitutedNodeValue
+
+
+ &InheritedProperties;
+
+
+
+
+ &Methods;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+ namespaceURI
+
+ The namespace URI of the element.
+
+
+
+ prefix
+
+ The namespace prefix of the element.
+
+
+
+ localName
+
+ The local name of the element.
+
+
+
+ tagName
+
+ The HTML-uppercased qualified name of the element.
+
+
+
+
+
+
+
+
+ classList
+
+
+ Returns an instance of Dom\TokenList to
+ easily manage the classes on this element.
+
+
+
+
+ attributes
+
+
+ Returns an instance of Dom\NamedNodeMap that
+ represents the attributes of this element.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ innerHTML
+
+ The inner HTML (or XML for XML documents) of the element.
+
+
+
+ substitutedNodeValue
+
+ The node value with entity substitution enabled.
+
+
+
+
+
+
+ &reftitle.notes;
+ &dom.note.utf8;
+
+
+
+
+
+
+
diff --git a/reference/dom/domelement.xml b/reference/dom/domelement.xml
index 15ad52fc4d07..94b66527d8ba 100644
--- a/reference/dom/domelement.xml
+++ b/reference/dom/domelement.xml
@@ -170,13 +170,13 @@
className
- A string representing the classes of the element separated by spaces
+ A string representing the classes of the element separated by spaces.id
- The element ID
+ Reflects the element ID through the "id" attribute.
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 1089a52c0035..e25ac1130662 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -211,6 +211,7 @@
+
From 67ff69027fd8d4183572f6185fb5aa8fe87668dc Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 21:01:49 +0100
Subject: [PATCH 29/45] Document Dom\HTMLCollection class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-htmlcollection.xml | 69 ++++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 71 insertions(+)
create mode 100644 reference/dom/dom/dom-htmlcollection.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index bc8391e348cd..839fc72f17bb 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -55,6 +55,7 @@
&reference.dom.dom.dom-element;
&reference.dom.dom.dom-entity;
&reference.dom.dom.dom-entityreference;
+ &reference.dom.dom.dom-htmlcollection;
&reference.dom.dom.dom-implementation;
&reference.dom.dom.dom-processinginstruction;
&reference.dom.dom.dom-namespaceinfo;
diff --git a/reference/dom/dom/dom-htmlcollection.xml b/reference/dom/dom/dom-htmlcollection.xml
new file mode 100644
index 000000000000..782078f07adf
--- /dev/null
+++ b/reference/dom/dom/dom-htmlcollection.xml
@@ -0,0 +1,69 @@
+
+
+
+ The Dom\HTMLCollection class
+ Dom\HTMLCollection
+
+
+
+
+ &reftitle.intro;
+
+ Represents a static set of elements.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ Dom\HTMLCollection
+
+
+
+ implements
+ IteratorAggregate
+
+
+
+ Countable
+
+
+ &Properties;
+
+ public
+ readonly
+ int
+ length
+
+
+ &Methods;
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+ length
+
+ The number of elements.
+
+
+
+
+
+
+ &reftitle.notes;
+ &dom.note.utf8;
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index e25ac1130662..35e80bbc0291 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -214,6 +214,7 @@
+
From 01097e6ed0104f6ab26ae25a78df8a2f4fd5ad3a Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 21:05:05 +0100
Subject: [PATCH 30/45] Document Dom\NamedNodeMap class
---
reference/dom/book.xml | 3 +-
reference/dom/dom/dom-namednodemap.xml | 69 ++++++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 72 insertions(+), 1 deletion(-)
create mode 100644 reference/dom/dom/dom-namednodemap.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index 839fc72f17bb..f6a1e3fc7205 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -57,10 +57,11 @@
&reference.dom.dom.dom-entityreference;
&reference.dom.dom.dom-htmlcollection;
&reference.dom.dom.dom-implementation;
- &reference.dom.dom.dom-processinginstruction;
+ &reference.dom.dom.dom-namednodemap;
&reference.dom.dom.dom-namespaceinfo;
&reference.dom.dom.dom-node;
&reference.dom.dom.dom-notation;
+ &reference.dom.dom.dom-processinginstruction;
&reference.dom.dom.dom-text;
+
+ The Dom\NamedNodeMap class
+ Dom\NamedNodeMap
+
+
+
+
+ &reftitle.intro;
+
+ Represents the set of attributes on an element.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ Dom\NamedNodeMap
+
+
+
+ implements
+ IteratorAggregate
+
+
+
+ Countable
+
+
+ &Properties;
+
+ public
+ readonly
+ int
+ length
+
+
+ &Methods;
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+ length
+
+ The number of attributes.
+
+
+
+
+
+
+ &reftitle.notes;
+ &dom.note.utf8;
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 35e80bbc0291..dccef986789d 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -215,6 +215,7 @@
+
From 3eacb0db0cbf97b59e8291a501659acd8db318e1 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 21:07:50 +0100
Subject: [PATCH 31/45] Document Dom\HTMLDocument class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-htmldocument.xml | 67 ++++++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 69 insertions(+)
create mode 100644 reference/dom/dom/dom-htmldocument.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index f6a1e3fc7205..ffc0095ecb4f 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -56,6 +56,7 @@
&reference.dom.dom.dom-entity;
&reference.dom.dom.dom-entityreference;
&reference.dom.dom.dom-htmlcollection;
+ &reference.dom.dom.dom-htmldocument;
&reference.dom.dom.dom-implementation;
&reference.dom.dom.dom-namednodemap;
&reference.dom.dom.dom-namespaceinfo;
diff --git a/reference/dom/dom/dom-htmldocument.xml b/reference/dom/dom/dom-htmldocument.xml
new file mode 100644
index 000000000000..a89fc3b89abb
--- /dev/null
+++ b/reference/dom/dom/dom-htmldocument.xml
@@ -0,0 +1,67 @@
+
+
+
+ The Dom\HTMLDocument class
+ Dom\HTMLDocument
+
+
+
+
+ &reftitle.intro;
+
+ Represents an HTML document.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ final
+ Dom\HTMLDocument
+
+
+
+ extends
+ Dom\Document
+
+
+ &InheritedConstants;
+
+
+
+
+ &InheritedProperties;
+
+
+
+
+
+
+
+ &Methods;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+
+
+
+ &reftitle.notes;
+ &dom.note.utf8;
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index dccef986789d..9b861f57b0aa 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -215,6 +215,7 @@
+
From db9331a0d59ae078257c893990f27a9bc0f1150d Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 21:11:04 +0100
Subject: [PATCH 32/45] Document Dom\HTMLElement class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-element.xml | 2 +-
reference/dom/dom/dom-htmlelement.xml | 59 +++++++++++++++++++++++++++
reference/dom/versions.xml | 1 +
4 files changed, 62 insertions(+), 1 deletion(-)
create mode 100644 reference/dom/dom/dom-htmlelement.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index ffc0095ecb4f..570642224d41 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -57,6 +57,7 @@
&reference.dom.dom.dom-entityreference;
&reference.dom.dom.dom-htmlcollection;
&reference.dom.dom.dom-htmldocument;
+ &reference.dom.dom.dom-htmlelement;
&reference.dom.dom.dom-implementation;
&reference.dom.dom.dom-namednodemap;
&reference.dom.dom.dom-namespaceinfo;
diff --git a/reference/dom/dom/dom-element.xml b/reference/dom/dom/dom-element.xml
index f3594d65bd67..e0d65157f389 100644
--- a/reference/dom/dom/dom-element.xml
+++ b/reference/dom/dom/dom-element.xml
@@ -3,7 +3,7 @@
The Dom\Element classDom\Element
-
+
diff --git a/reference/dom/dom/dom-htmlelement.xml b/reference/dom/dom/dom-htmlelement.xml
new file mode 100644
index 000000000000..05cb4a07a4f9
--- /dev/null
+++ b/reference/dom/dom/dom-htmlelement.xml
@@ -0,0 +1,59 @@
+
+
+
+ The Dom\HTMLElement class
+ Dom\HTMLElement
+
+
+
+
+ &reftitle.intro;
+
+ Represents an element in the HTML namespace.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ Dom\HTMLElement
+
+
+
+ extends
+ Dom\Element
+
+
+ &InheritedConstants;
+
+
+
+
+ &InheritedProperties;
+
+
+
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+
+
+
+ &reftitle.notes;
+ &dom.note.utf8;
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 9b861f57b0aa..fd76f131f018 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -216,6 +216,7 @@
+
From 30539db8cf99fb869ab20e4e8a8c903b1d851af1 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 21:18:10 +0100
Subject: [PATCH 33/45] Document Dom\NodeList class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-nodelist.xml | 64 ++++++++++++++++++++++++++++++
reference/dom/domnodelist.xml | 10 ++---
reference/dom/versions.xml | 1 +
4 files changed, 69 insertions(+), 7 deletions(-)
create mode 100644 reference/dom/dom/dom-nodelist.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index 570642224d41..1d1c0fe1d5cf 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -62,6 +62,7 @@
&reference.dom.dom.dom-namednodemap;
&reference.dom.dom.dom-namespaceinfo;
&reference.dom.dom.dom-node;
+ &reference.dom.dom.dom-nodelist;
&reference.dom.dom.dom-notation;
&reference.dom.dom.dom-processinginstruction;
&reference.dom.dom.dom-text;
diff --git a/reference/dom/dom/dom-nodelist.xml b/reference/dom/dom/dom-nodelist.xml
new file mode 100644
index 000000000000..317f6f86b256
--- /dev/null
+++ b/reference/dom/dom/dom-nodelist.xml
@@ -0,0 +1,64 @@
+
+
+
+ The Dom\NodeList class
+ Dom\NodeList
+
+
+
+
+
+
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMNodeList.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+ Dom\NodeList
+
+
+
+ implements
+ IteratorAggregate
+
+
+
+ Countable
+
+
+ &Properties;
+
+ public
+ readonly
+ int
+ length
+
+
+ &Methods;
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/domnodelist.xml b/reference/dom/domnodelist.xml
index e1e800b9fff1..c9450c2e083d 100644
--- a/reference/dom/domnodelist.xml
+++ b/reference/dom/domnodelist.xml
@@ -12,16 +12,12 @@ Remove me once you perform substitutions
-
-
-
&reftitle.classsynopsis;
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index fd76f131f018..d16311eb8c58 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -220,6 +220,7 @@
+
From 4d2421d78c87d3ba9e44d8c2fa29c5ea95ad6387 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 21:23:47 +0100
Subject: [PATCH 34/45] Document Dom\ParentNode interface
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-parentnode.xml | 36 ++++++++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 38 insertions(+)
create mode 100644 reference/dom/dom/dom-parentnode.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index 1d1c0fe1d5cf..fcf6edf9a582 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -64,6 +64,7 @@
&reference.dom.dom.dom-node;
&reference.dom.dom.dom-nodelist;
&reference.dom.dom.dom-notation;
+ &reference.dom.dom.dom-parentnode;
&reference.dom.dom.dom-processinginstruction;
&reference.dom.dom.dom-text;
diff --git a/reference/dom/dom/dom-parentnode.xml b/reference/dom/dom/dom-parentnode.xml
new file mode 100644
index 000000000000..f2391e05ffa1
--- /dev/null
+++ b/reference/dom/dom/dom-parentnode.xml
@@ -0,0 +1,36 @@
+
+
+ The Dom\ParentNode interface
+ Dom\ParentNode
+
+
+
+
+ &reftitle.intro;
+
+ This is the modern, spec-compliant equivalent of
+ DOMParentNode.
+
+
+
+
+ &reftitle.interfacesynopsis;
+
+
+
+ Dom\ParentNode
+
+
+ &Methods;
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index d16311eb8c58..d43b22c76d72 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -223,6 +223,7 @@
+
From 850ccce1b93b2ba7aeccb8b59df4dadd50cd7e1f Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Sun, 1 Dec 2024 21:31:10 +0100
Subject: [PATCH 35/45] Document Dom\XMLDocument class
---
reference/dom/book.xml | 1 +
reference/dom/dom/dom-xmldocument.xml | 117 ++++++++++++++++++++++++++
reference/dom/versions.xml | 1 +
3 files changed, 119 insertions(+)
create mode 100644 reference/dom/dom/dom-xmldocument.xml
diff --git a/reference/dom/book.xml b/reference/dom/book.xml
index fcf6edf9a582..1d5080c88227 100644
--- a/reference/dom/book.xml
+++ b/reference/dom/book.xml
@@ -67,6 +67,7 @@
&reference.dom.dom.dom-parentnode;
&reference.dom.dom.dom-processinginstruction;
&reference.dom.dom.dom-text;
+ &reference.dom.dom.dom-xmldocument;
+
+ The Dom\XMLDocument class
+ Dom\XMLDocument
+
+
+
+
+ &reftitle.intro;
+
+ Represents an XML document.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ final
+ Dom\XMLDocument
+
+
+
+ extends
+ Dom\Document
+
+
+ &InheritedConstants;
+
+
+
+
+ &Properties;
+
+ public
+ readonly
+ string
+ xmlEncoding
+
+
+ public
+ bool
+ xmlStandalone
+
+
+ public
+ string
+ xmlVersion
+
+
+ public
+ bool
+ formatOutput
+
+
+ &InheritedProperties;
+
+
+
+
+
+
+
+ &Methods;
+
+
+
+
+ &InheritedMethods;
+
+
+
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ formatOutput
+
+ Nicely formats output with indentation and extra space.
+
+
+
+
+
+
+ &reftitle.notes;
+ &dom.note.utf8;
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index d43b22c76d72..519919ac6247 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -226,6 +226,7 @@
+
+
+ The Dom\TokenList class
+ Dom\TokenList
+
+
+
+
+ &reftitle.intro;
+
+ Represents a set of tokens in an attribute (e.g. class names).
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ final
+ Dom\TokenList
+
+
+
+ implements
+ IteratorAggregate
+
+
+
+ Countable
+
+
+ &Properties;
+
+ public
+ readonly
+ int
+ length
+
+
+ public
+ string
+ value
+
+
+ &Methods;
+
+
+
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+ length
+
+ The number of tokens.
+
+
+
+ value
+
+ The value of the attribute linked to this object.
+
+
+
+
+
+
+ &reftitle.notes;
+ &dom.note.utf8;
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 519919ac6247..18fab7f06718 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -226,6 +226,7 @@
+
+
+ The Dom\XPath class
+ Dom\XPath
+
+
+
+
+
+
+
+
+ This is the modern, spec-compliant equivalent of
+ DOMXPath.
+
+
+
+
+ &reftitle.classsynopsis;
+
+
+
+ final
+ Dom\XPath
+
+
+ &Properties;
+
+ public
+ readonly
+ Dom\Document
+ document
+
+
+ public
+ bool
+ registerNodeNamespaces
+
+
+ &Methods;
+
+
+
+
+
+
+
+
+
+
+ &reftitle.properties;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/reference/dom/domxpath.xml b/reference/dom/domxpath.xml
index d3c70124a563..5320a119a5c0 100644
--- a/reference/dom/domxpath.xml
+++ b/reference/dom/domxpath.xml
@@ -15,9 +15,9 @@ Remove me once you perform substitutions
&reftitle.intro;
-
- Supports XPath 1.0
-
+
+ Allows to use XPath 1.0 queries on HTML or XML documents.
+
@@ -56,20 +56,19 @@ Remove me once you perform substitutions
-
&reftitle.properties;
document
-
+ The document that is linked to this object.registerNodeNamespaces
- When set to &true;, namespaces in the node are registered.
+ When set to &true;, namespaces in the node are registered.
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 18fab7f06718..77f68a3929f7 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -228,6 +228,7 @@
+
diff --git a/reference/dom/dom/attr/rename.xml b/reference/dom/dom/attr/rename.xml
new file mode 100644
index 000000000000..2a58f9f047f6
--- /dev/null
+++ b/reference/dom/dom/attr/rename.xml
@@ -0,0 +1,174 @@
+
+
+
+ Dom\Attr::rename
+ Changes the qualified name or namespace of an attribute
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\Attr::rename
+ stringnullnamespaceURI
+ stringqualifiedName
+
+
+ This method changes the qualified name or namespace of an attribute.
+
+
+
+
+ &reftitle.parameters;
+
+
+ namespaceURI
+
+
+ The new namespace URI of the attribute.
+
+
+
+
+ qualifiedName
+
+
+ The new qualified name of the attribute.
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ &return.void;
+
+
+
+
+ &reftitle.errors;
+
+
+ DOMException with code Dom\NAMESPACE_ERR
+
+
+ Raised if there is an error with the namespace, as determined by
+ qualifiedName.
+
+
+
+
+ DOMException with code Dom\INVALID_MODIFICATION_ERR
+
+
+ Raised if there already exists an attribute in the element with the same
+ qualified name.
+
+
+
+
+
+
+
+ &reftitle.examples;
+
+ Dom\Attr::rename example to change both the namespace and qualified name
+
+ This changes the qualified name of my-attr to
+ my-new-attr and also changes its namespace to
+ urn:my-ns.
+
+
+');
+
+$root = $doc->documentElement;
+$attribute = $root->attributes['my-attr'];
+$attribute->rename('urn:my-ns', 'my-new-attr');
+
+echo $doc->saveXml();
+
+?>
+]]>
+
+ &example.outputs;
+
+
+
+]]>
+
+
+
+ Dom\Attr::rename example to change only the qualified name
+
+ This only changes the qualified name of my-attr
+ and keeps the namespace URI the same.
+
+
+');
+
+$root = $doc->documentElement;
+$attribute = $root->attributes['my-attr'];
+$attribute->rename($attribute->namespaceURI, 'my-new-attr');
+
+echo $doc->saveXml();
+
+?>
+]]>
+
+ &example.outputs;
+
+
+
+]]>
+
+
+
+
+
+ &reftitle.notes;
+
+
+ It is sometimes necessary to change the qualified name and namespace
+ URI together in one step to not break any
+ namespace rules.
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\Element::rename
+
+
+
+
+
diff --git a/reference/dom/dom/dom-attr.xml b/reference/dom/dom/dom-attr.xml
index b6956ef86659..f6b193d7e97c 100644
--- a/reference/dom/dom/dom-attr.xml
+++ b/reference/dom/dom/dom-attr.xml
@@ -158,6 +158,6 @@
-
+ &reference.dom.dom.entities.attr;
diff --git a/reference/dom/domattr/isid.xml b/reference/dom/domattr/isid.xml
index 8b468896c55a..c34997af6143 100644
--- a/reference/dom/domattr/isid.xml
+++ b/reference/dom/domattr/isid.xml
@@ -31,9 +31,9 @@
&reftitle.returnvalues;
-
- &return.success;
-
+
+ Returns &true; if this attribute is a defined ID, &false; otherwise.
+
&reftitle.examples;
@@ -44,11 +44,11 @@
validateOnParse = true;
-$doc->Load('book.xml');
+$doc->load('book.xml');
// We retrieve the attribute named id of the chapter element
$attr = $doc->getElementsByTagName('chapter')->item(0)->getAttributeNode('id');
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 77f68a3929f7..f00e0b41dff9 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -229,6 +229,9 @@
+
+
+
diff --git a/reference/dom/dom/childnode/before.xml b/reference/dom/dom/childnode/before.xml
new file mode 100644
index 000000000000..b1bc03224139
--- /dev/null
+++ b/reference/dom/dom/childnode/before.xml
@@ -0,0 +1,50 @@
+
+
+
+ Dom\ChildNode::before
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\ChildNode::before
+ Dom\Nodestringnodes
+
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\ChildNode::after
+ Dom\ChildNode::remove
+ Dom\ChildNode::replaceWith
+
+
+
+
+
diff --git a/reference/dom/dom/childnode/remove.xml b/reference/dom/dom/childnode/remove.xml
new file mode 100644
index 000000000000..c6677b6264b5
--- /dev/null
+++ b/reference/dom/dom/childnode/remove.xml
@@ -0,0 +1,50 @@
+
+
+
+ Dom\ChildNode::remove
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\ChildNode::remove
+
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\ChildNode::after
+ Dom\ChildNode::before
+ Dom\ChildNode::replaceWith
+ Dom\Node::removeChild
+
+
+
+
+
diff --git a/reference/dom/dom/childnode/replacewith.xml b/reference/dom/dom/childnode/replacewith.xml
new file mode 100644
index 000000000000..5896ff77547e
--- /dev/null
+++ b/reference/dom/dom/childnode/replacewith.xml
@@ -0,0 +1,51 @@
+
+
+
+ Dom\ChildNode::replaceWith
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\ChildNode::replaceWith
+ Dom\Nodestringnodes
+
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\ChildNode::after
+ Dom\ChildNode::before
+ Dom\ChildNode::remove
+ Dom\Node::replaceChild
+
+
+
+
+
diff --git a/reference/dom/dom/dom-childnode.xml b/reference/dom/dom/dom-childnode.xml
index 8bc8dcbe4946..76ee048e58c8 100644
--- a/reference/dom/dom/dom-childnode.xml
+++ b/reference/dom/dom/dom-childnode.xml
@@ -30,6 +30,6 @@
-
+ &reference.dom.dom.entities.childnode;
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index f00e0b41dff9..d91d5619d4bd 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -232,6 +232,11 @@
+
+
+
+
+
diff --git a/reference/dom/dom/characterdata/appenddata.xml b/reference/dom/dom/characterdata/appenddata.xml
new file mode 100644
index 000000000000..d0d0e46b93ae
--- /dev/null
+++ b/reference/dom/dom/characterdata/appenddata.xml
@@ -0,0 +1,50 @@
+
+
+
+ Dom\CharacterData::appendData
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\CharacterData::appendData
+ stringdata
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\CharacterData::deleteData
+ Dom\CharacterData::insertData
+ Dom\CharacterData::replaceData
+ Dom\CharacterData::substringData
+
+
+
+
+
diff --git a/reference/dom/dom/characterdata/before.xml b/reference/dom/dom/characterdata/before.xml
new file mode 100644
index 000000000000..3bcf13ae87ba
--- /dev/null
+++ b/reference/dom/dom/characterdata/before.xml
@@ -0,0 +1,78 @@
+
+
+
+ Dom\CharacterData::before
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\CharacterData::before
+ Dom\Nodestringnodes
+
+
+
+
+
+
+
+
+
+ &reftitle.examples;
+
+ Dom\CharacterData::before example
+
+ Adds nodes before the character data.
+
+
+");
+$cdata = $doc->documentElement->firstChild;
+
+$cdata->before("hello", $doc->createElement("beautiful"));
+
+echo $doc->saveXML();
+?>
+]]>
+
+ &example.outputs;
+
+
+hello
+]]>
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\ChildNode::before
+ Dom\CharacterData::after
+
+
+
+
+
diff --git a/reference/dom/dom/characterdata/deletedata.xml b/reference/dom/dom/characterdata/deletedata.xml
new file mode 100644
index 000000000000..7da28c71d02d
--- /dev/null
+++ b/reference/dom/dom/characterdata/deletedata.xml
@@ -0,0 +1,52 @@
+
+
+
+ Dom\CharacterData::deleteData
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\CharacterData::deleteData
+ intoffset
+ intcount
+
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\CharacterData::appendData
+ Dom\CharacterData::insertData
+ Dom\CharacterData::replaceData
+ Dom\CharacterData::substringData
+
+
+
+
+
diff --git a/reference/dom/dom/characterdata/insertdata.xml b/reference/dom/dom/characterdata/insertdata.xml
new file mode 100644
index 000000000000..60a4870a241e
--- /dev/null
+++ b/reference/dom/dom/characterdata/insertdata.xml
@@ -0,0 +1,52 @@
+
+
+
+ Dom\CharacterData::insertData
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\CharacterData::insertData
+ intoffset
+ stringdata
+
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\CharacterData::appendData
+ Dom\CharacterData::deleteData
+ Dom\CharacterData::replaceData
+ Dom\CharacterData::substringData
+
+
+
+
+
diff --git a/reference/dom/dom/characterdata/remove.xml b/reference/dom/dom/characterdata/remove.xml
new file mode 100644
index 000000000000..fa9b2a31c617
--- /dev/null
+++ b/reference/dom/dom/characterdata/remove.xml
@@ -0,0 +1,80 @@
+
+
+
+ Dom\CharacterData::remove
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\CharacterData::remove
+
+
+
+
+
+
+
+
+
+ &reftitle.examples;
+
+ Dom\CharacterData::remove example
+
+ Removes the character data.
+
+
+");
+$cdata = $doc->documentElement->firstChild;
+
+$cdata->remove();
+
+echo $doc->saveXML();
+?>
+]]>
+
+ &example.outputs;
+
+
+
+]]>
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\ChildNode::remove
+ Dom\CharacterData::after
+ Dom\CharacterData::before
+ Dom\CharacterData::replaceWith
+ Dom\Node::removeChild
+
+
+
+
+
diff --git a/reference/dom/dom/characterdata/replacedata.xml b/reference/dom/dom/characterdata/replacedata.xml
new file mode 100644
index 000000000000..6763ab6ae945
--- /dev/null
+++ b/reference/dom/dom/characterdata/replacedata.xml
@@ -0,0 +1,53 @@
+
+
+
+ Dom\CharacterData::replaceData
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\CharacterData::replaceData
+ intoffset
+ intcount
+ stringdata
+
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\CharacterData::appendData
+ Dom\CharacterData::deleteData
+ Dom\CharacterData::insertData
+ Dom\CharacterData::substringData
+
+
+
+
+
diff --git a/reference/dom/dom/characterdata/replacewith.xml b/reference/dom/dom/characterdata/replacewith.xml
new file mode 100644
index 000000000000..9e41aad17c45
--- /dev/null
+++ b/reference/dom/dom/characterdata/replacewith.xml
@@ -0,0 +1,80 @@
+
+
+
+ Dom\CharacterData::replaceWith
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\CharacterData::replaceWith
+ Dom\Nodestringnodes
+
+
+
+
+
+
+
+
+
+ &reftitle.examples;
+
+ Dom\CharacterData::replaceWith example
+
+ Replaces the character data with new nodes.
+
+
+");
+$cdata = $doc->documentElement->firstChild;
+
+$cdata->replaceWith("beautiful", $doc->createElement("world"));
+
+echo $doc->saveXML();
+?>
+]]>
+
+ &example.outputs;
+
+
+beautiful
+]]>
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\ChildNode::replaceWith
+ Dom\CharacterData::after
+ Dom\CharacterData::before
+ Dom\CharacterData::remove
+
+
+
+
+
diff --git a/reference/dom/dom/characterdata/substringdata.xml b/reference/dom/dom/characterdata/substringdata.xml
new file mode 100644
index 000000000000..ea95d9e9d5ad
--- /dev/null
+++ b/reference/dom/dom/characterdata/substringdata.xml
@@ -0,0 +1,52 @@
+
+
+
+ Dom\CharacterData::substringData
+
+
+
+
+ &reftitle.description;
+
+ publicstringDom\CharacterData::substringData
+ intoffset
+ intcount
+
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\CharacterData::appendData
+ Dom\CharacterData::deleteData
+ Dom\CharacterData::insertData
+ Dom\CharacterData::replaceData
+
+
+
+
+
diff --git a/reference/dom/dom/dom-characterdata.xml b/reference/dom/dom/dom-characterdata.xml
index 9231940e6770..9db8b00f2a14 100644
--- a/reference/dom/dom/dom-characterdata.xml
+++ b/reference/dom/dom/dom-characterdata.xml
@@ -6,8 +6,7 @@
- &reftitle.intro;
-
+
@@ -115,6 +114,6 @@
-
+ &reference.dom.dom.entities.characterdata;
diff --git a/reference/dom/domcharacterdata/after.xml b/reference/dom/domcharacterdata/after.xml
index 00e7714810fb..f0be9e40bdc5 100644
--- a/reference/dom/domcharacterdata/after.xml
+++ b/reference/dom/domcharacterdata/after.xml
@@ -12,7 +12,7 @@
DOMNodestringnodes
- Adds the passed nodes after the element.
+ Adds the passed nodes after the character data.
diff --git a/reference/dom/domcharacterdata/before.xml b/reference/dom/domcharacterdata/before.xml
index fb2dac93161b..e3ee7ece9858 100644
--- a/reference/dom/domcharacterdata/before.xml
+++ b/reference/dom/domcharacterdata/before.xml
@@ -2,7 +2,7 @@
DOMCharacterData::before
- Adds nodes before the node
+ Adds nodes before the character data
@@ -12,7 +12,7 @@
DOMNodestringnodes
- Adds the passed nodes before the node.
+ Adds the passed nodes before the character data.
diff --git a/reference/dom/domcharacterdata/deletedata.xml b/reference/dom/domcharacterdata/deletedata.xml
index 49849775479a..bc18fca2dff3 100644
--- a/reference/dom/domcharacterdata/deletedata.xml
+++ b/reference/dom/domcharacterdata/deletedata.xml
@@ -4,7 +4,7 @@
DOMCharacterData::deleteData
- Remove a range of characters from the node
+ Remove a range of characters from the character data
diff --git a/reference/dom/domcharacterdata/remove.xml b/reference/dom/domcharacterdata/remove.xml
index 9c178b2bc7d1..ace20823aeaf 100644
--- a/reference/dom/domcharacterdata/remove.xml
+++ b/reference/dom/domcharacterdata/remove.xml
@@ -2,7 +2,7 @@
DOMCharacterData::remove
- Removes the character data
+ Removes the character data node
@@ -12,7 +12,7 @@
- Removes the character data.
+ Removes the character data node.
diff --git a/reference/dom/domcharacterdata/replacedata.xml b/reference/dom/domcharacterdata/replacedata.xml
index 5db78ab40181..b42d60de31cc 100644
--- a/reference/dom/domcharacterdata/replacedata.xml
+++ b/reference/dom/domcharacterdata/replacedata.xml
@@ -4,7 +4,7 @@
DOMCharacterData::replaceData
- Replace a substring within the DOMCharacterData node
+ Replace a substring within the character data
diff --git a/reference/dom/domcharacterdata/substringdata.xml b/reference/dom/domcharacterdata/substringdata.xml
index 7c11b6897bbe..1212f85baf16 100644
--- a/reference/dom/domcharacterdata/substringdata.xml
+++ b/reference/dom/domcharacterdata/substringdata.xml
@@ -4,7 +4,7 @@
DOMCharacterData::substringData
- Extracts a range of data from the node
+ Extracts a range of data from the character data
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index d91d5619d4bd..de503c9eb133 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -233,6 +233,16 @@
+
+
+
+
+
+
+
+
+
+
From 340ac77f18f4f697f75a1f6f7d67eae7feb1b045 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Tue, 3 Dec 2024 21:23:53 +0100
Subject: [PATCH 41/45] Document Dom\Text methods
---
reference/dom/dom/dom-text.xml | 6 +++--
reference/dom/dom/text/splittext.xml | 39 ++++++++++++++++++++++++++++
reference/dom/versions.xml | 2 ++
3 files changed, 45 insertions(+), 2 deletions(-)
create mode 100644 reference/dom/dom/text/splittext.xml
diff --git a/reference/dom/dom/dom-text.xml b/reference/dom/dom/dom-text.xml
index 754acdf77085..fd4118ed9ca4 100644
--- a/reference/dom/dom/dom-text.xml
+++ b/reference/dom/dom/dom-text.xml
@@ -8,10 +8,10 @@
&reftitle.intro;
-
+
The Dom\Text class inherits from
Dom\CharacterData and represents a text node.
-
+
This is the modern, spec-compliant equivalent of
DOMText.
@@ -80,4 +80,6 @@
+ &reference.dom.dom.entities.text;
+
diff --git a/reference/dom/dom/text/splittext.xml b/reference/dom/dom/text/splittext.xml
new file mode 100644
index 000000000000..501f4c82cd6e
--- /dev/null
+++ b/reference/dom/dom/text/splittext.xml
@@ -0,0 +1,39 @@
+
+
+
+ Dom\Text::splitText
+
+
+
+
+ &reftitle.description;
+
+ publicDom\TextDom\Text::splitText
+ intoffset
+
+
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index de503c9eb133..754a6425646b 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -247,6 +247,8 @@
+
+
+ &reference.dom.dom.entities.parentnode;
diff --git a/reference/dom/dom/parentnode/append.xml b/reference/dom/dom/parentnode/append.xml
new file mode 100644
index 000000000000..25b84d54fd03
--- /dev/null
+++ b/reference/dom/dom/parentnode/append.xml
@@ -0,0 +1,48 @@
+
+
+
+ Dom\ParentNode::append
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\ParentNode::append
+ Dom\Nodestringnodes
+
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\ParentNode::prepend
+
+
+
+
+
diff --git a/reference/dom/dom/parentnode/prepend.xml b/reference/dom/dom/parentnode/prepend.xml
new file mode 100644
index 000000000000..3c348de60d51
--- /dev/null
+++ b/reference/dom/dom/parentnode/prepend.xml
@@ -0,0 +1,48 @@
+
+
+
+ Dom\ParentNode::prepend
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\ParentNode::prepend
+ Dom\Nodestringnodes
+
+
+
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\ParentNode::append
+
+
+
+
+
diff --git a/reference/dom/dom/parentnode/queryselector.xml b/reference/dom/dom/parentnode/queryselector.xml
new file mode 100644
index 000000000000..fb2f0115f1d9
--- /dev/null
+++ b/reference/dom/dom/parentnode/queryselector.xml
@@ -0,0 +1,78 @@
+
+
+
+ Dom\ParentNode::querySelector
+ Returns the first element that matches the CSS selectors
+
+
+
+ &reftitle.description;
+
+ publicDom\ElementnullDom\ParentNode::querySelector
+ stringselectors
+
+
+ Returns the first element that matches the CSS selectors specified
+ in selectors.
+
+
+
+
+ &reftitle.parameters;
+
+
+ selectors
+
+
+ A string containing one or more CSS selectors.
+
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns the first Dom\Element that matches
+ selectors. Returns &null; if no element matches.
+
+
+
+
+ &reftitle.errors;
+
+ Throws a DOMException with code
+ Dom\SYNTAX_ERR when selectors
+ is not a valid CSS selector string.
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\ParentNode::querySelectorAll
+
+
+
+
+
diff --git a/reference/dom/dom/parentnode/queryselectorall.xml b/reference/dom/dom/parentnode/queryselectorall.xml
new file mode 100644
index 000000000000..1c2377eb8978
--- /dev/null
+++ b/reference/dom/dom/parentnode/queryselectorall.xml
@@ -0,0 +1,59 @@
+
+
+
+ Dom\ParentNode::querySelectorAll
+ Returns a collection of elements that match the CSS selectors
+
+
+
+ &reftitle.description;
+
+ publicDom\NodeListDom\ParentNode::querySelectorAll
+ stringselectors
+
+
+ Returns a collection of elements that match the CSS selectors specified
+ in selectors.
+
+
+
+
+
+
+ &reftitle.returnvalues;
+
+ Returns a static collection of elements that match the CSS selectors
+ specified in selectors.
+
+
+
+
+
+
+ &reftitle.seealso;
+
+ Dom\ParentNode::querySelector
+
+
+
+
+
diff --git a/reference/dom/dom/parentnode/replacechildren.xml b/reference/dom/dom/parentnode/replacechildren.xml
new file mode 100644
index 000000000000..569a83a28898
--- /dev/null
+++ b/reference/dom/dom/parentnode/replacechildren.xml
@@ -0,0 +1,64 @@
+
+
+
+ Dom\ParentNode::replaceChildren
+
+
+
+
+ &reftitle.description;
+
+ publicvoidDom\ParentNode::replaceChildren
+ Dom\Nodestringnodes
+
+
+
+
+
+
+
+
+
+ &reftitle.examples;
+
+ Dom\ParentNode::replaceChildren example
+
+
hi
test
hi2
');
+
+$dom->documentElement->replaceChildren('foo', $dom->createElement('p'), 'bar');
+echo $dom->saveHtml();
+?>
+]]>
+
+ &example.outputs;
+
+foobar
+]]>
+
+
+
+
+
+
diff --git a/reference/dom/versions.xml b/reference/dom/versions.xml
index 754a6425646b..514f4b0e865f 100644
--- a/reference/dom/versions.xml
+++ b/reference/dom/versions.xml
@@ -248,6 +248,12 @@
+
+
+
+
+
+
diff --git a/reference/dom/dom/dom-cdatasection.xml b/reference/dom/dom/dom-cdatasection.xml
index 76488b0480fb..bb6f281628d7 100644
--- a/reference/dom/dom/dom-cdatasection.xml
+++ b/reference/dom/dom/dom-cdatasection.xml
@@ -55,9 +55,10 @@
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-characterdata.xml b/reference/dom/dom/dom-characterdata.xml
index 9db8b00f2a14..8c01211d92bd 100644
--- a/reference/dom/dom/dom-characterdata.xml
+++ b/reference/dom/dom/dom-characterdata.xml
@@ -73,9 +73,10 @@
&InheritedMethods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-comment.xml b/reference/dom/dom/dom-comment.xml
index cb3d89bcffff..6b316f97377c 100644
--- a/reference/dom/dom/dom-comment.xml
+++ b/reference/dom/dom/dom-comment.xml
@@ -46,9 +46,10 @@
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-document.xml b/reference/dom/dom/dom-document.xml
index 21e99fb2863f..0c472d5de5e4 100644
--- a/reference/dom/dom/dom-document.xml
+++ b/reference/dom/dom/dom-document.xml
@@ -127,14 +127,16 @@
&Methods;
-
+ Not documented yet
+
&InheritedMethods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-documentfragment.xml b/reference/dom/dom/dom-documentfragment.xml
index 91d4c0d4afb8..1c5b8390a8e6 100644
--- a/reference/dom/dom/dom-documentfragment.xml
+++ b/reference/dom/dom/dom-documentfragment.xml
@@ -67,14 +67,16 @@
&Methods;
-
+ Not documented yet
+
&InheritedMethods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-documenttype.xml b/reference/dom/dom/dom-documenttype.xml
index 2d44c3f3103f..30ba11dc6968 100644
--- a/reference/dom/dom/dom-documenttype.xml
+++ b/reference/dom/dom/dom-documenttype.xml
@@ -83,14 +83,16 @@
&Methods;
-
+ Not documented yet
+
&InheritedMethods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-dtdnamednodemap.xml b/reference/dom/dom/dom-dtdnamednodemap.xml
index 925d0cf4c92a..ea93c0b95498 100644
--- a/reference/dom/dom/dom-dtdnamednodemap.xml
+++ b/reference/dom/dom/dom-dtdnamednodemap.xml
@@ -40,9 +40,10 @@
&Methods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-element.xml b/reference/dom/dom/dom-element.xml
index e0d65157f389..6359577cb7b2 100644
--- a/reference/dom/dom/dom-element.xml
+++ b/reference/dom/dom/dom-element.xml
@@ -138,14 +138,16 @@
&Methods;
-
+ Not documented yet
+
&InheritedMethods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-entity.xml b/reference/dom/dom/dom-entity.xml
index 3158329782eb..19bd810c89f8 100644
--- a/reference/dom/dom/dom-entity.xml
+++ b/reference/dom/dom/dom-entity.xml
@@ -58,9 +58,10 @@
&InheritedMethods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-entityreference.xml b/reference/dom/dom/dom-entityreference.xml
index 5b01a743843a..dab7725246d6 100644
--- a/reference/dom/dom/dom-entityreference.xml
+++ b/reference/dom/dom/dom-entityreference.xml
@@ -38,9 +38,10 @@
&InheritedMethods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-htmlcollection.xml b/reference/dom/dom/dom-htmlcollection.xml
index 782078f07adf..a6be17f43e55 100644
--- a/reference/dom/dom/dom-htmlcollection.xml
+++ b/reference/dom/dom/dom-htmlcollection.xml
@@ -39,9 +39,10 @@
&Methods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-htmldocument.xml b/reference/dom/dom/dom-htmldocument.xml
index a89fc3b89abb..174c59c03665 100644
--- a/reference/dom/dom/dom-htmldocument.xml
+++ b/reference/dom/dom/dom-htmldocument.xml
@@ -41,17 +41,19 @@
&Methods;
-
+ Not documented yet
+
&InheritedMethods;
-
+ Not documented yet
+
+
diff --git a/reference/dom/dom/dom-htmlelement.xml b/reference/dom/dom/dom-htmlelement.xml
index 05cb4a07a4f9..8c6db83c654a 100644
--- a/reference/dom/dom/dom-htmlelement.xml
+++ b/reference/dom/dom/dom-htmlelement.xml
@@ -40,12 +40,13 @@
&InheritedMethods;
-
+ Not documented yet
+
+
diff --git a/reference/dom/dom/dom-implementation.xml b/reference/dom/dom/dom-implementation.xml
index cd2b777f8aa8..dcbd68fe9912 100644
--- a/reference/dom/dom/dom-implementation.xml
+++ b/reference/dom/dom/dom-implementation.xml
@@ -27,9 +27,10 @@
&Methods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-namednodemap.xml b/reference/dom/dom/dom-namednodemap.xml
index 38cf86315888..67a9b5387474 100644
--- a/reference/dom/dom/dom-namednodemap.xml
+++ b/reference/dom/dom/dom-namednodemap.xml
@@ -39,9 +39,10 @@
&Methods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-node.xml b/reference/dom/dom/dom-node.xml
index 3b8a5c2452fe..b097eb2fedda 100644
--- a/reference/dom/dom/dom-node.xml
+++ b/reference/dom/dom/dom-node.xml
@@ -150,12 +150,10 @@
&Methods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-nodelist.xml b/reference/dom/dom/dom-nodelist.xml
index 317f6f86b256..975f3767cede 100644
--- a/reference/dom/dom/dom-nodelist.xml
+++ b/reference/dom/dom/dom-nodelist.xml
@@ -41,9 +41,10 @@
&Methods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-notation.xml b/reference/dom/dom/dom-notation.xml
index a76a22849404..a30ed41cef42 100644
--- a/reference/dom/dom/dom-notation.xml
+++ b/reference/dom/dom/dom-notation.xml
@@ -43,9 +43,10 @@
&InheritedMethods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-processinginstruction.xml b/reference/dom/dom/dom-processinginstruction.xml
index e7e58f215a22..a409ea379e18 100644
--- a/reference/dom/dom/dom-processinginstruction.xml
+++ b/reference/dom/dom/dom-processinginstruction.xml
@@ -54,9 +54,10 @@
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-text.xml b/reference/dom/dom/dom-text.xml
index fd4118ed9ca4..2644a690dcfb 100644
--- a/reference/dom/dom/dom-text.xml
+++ b/reference/dom/dom/dom-text.xml
@@ -61,9 +61,10 @@
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-tokenlist.xml b/reference/dom/dom/dom-tokenlist.xml
index 45f4e29e55c2..b61e03f6506a 100644
--- a/reference/dom/dom/dom-tokenlist.xml
+++ b/reference/dom/dom/dom-tokenlist.xml
@@ -45,12 +45,13 @@
&Methods;
-
+ Not documented yet
+
diff --git a/reference/dom/dom/dom-xmldocument.xml b/reference/dom/dom/dom-xmldocument.xml
index 3a51a94c8e26..32f3cb43ec1c 100644
--- a/reference/dom/dom/dom-xmldocument.xml
+++ b/reference/dom/dom/dom-xmldocument.xml
@@ -64,17 +64,19 @@
&Methods;
-
+ Not documented yet
+
&InheritedMethods;
-
+ Not documented yet
+
+
diff --git a/reference/dom/dom/dom-xpath.xml b/reference/dom/dom/dom-xpath.xml
index 02d7278520c0..9dc15d192364 100644
--- a/reference/dom/dom/dom-xpath.xml
+++ b/reference/dom/dom/dom-xpath.xml
@@ -39,12 +39,13 @@
&Methods;
-
+ Not documented yet
+
From 0b1338c537b8e0627acae4299fee376647b21ba3 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Thu, 5 Dec 2024 22:10:07 +0100
Subject: [PATCH 44/45] Update encoding note for new DOM
---
language-snippets.ent | 6 ++++++
reference/dom/dom/dom-element.xml | 2 +-
reference/dom/dom/dom-htmlcollection.xml | 2 +-
reference/dom/dom/dom-htmldocument.xml | 2 +-
reference/dom/dom/dom-htmlelement.xml | 2 +-
reference/dom/dom/dom-namednodemap.xml | 2 +-
reference/dom/dom/dom-node.xml | 2 +-
reference/dom/dom/dom-tokenlist.xml | 2 +-
reference/dom/dom/dom-xmldocument.xml | 2 +-
9 files changed, 14 insertions(+), 8 deletions(-)
diff --git a/language-snippets.ent b/language-snippets.ent
index e95b222b207e..864d55929b19 100644
--- a/language-snippets.ent
+++ b/language-snippets.ent
@@ -1648,6 +1648,12 @@ it is inserted with (e.g.) DOMNo
While malformed HTML should load successfully, this function may generate E_WARNING errors when it encounters bad markup. libxml's error handling functions may be used to handle these errors.'>
The DOM extension uses UTF-8 encoding. Use mb_convert_encoding, UConverter::transcode, or iconv to handle other encodings.'>
+
+
+ The DOM extension uses UTF-8 encoding when working with methods or properties.
+ The parser methods auto-detect the encoding or allow the caller to specify an encoding.
+
+'>
When using json_encode on a DOMDocument object the result will be that of encoding an empty object.'>
diff --git a/reference/dom/dom/dom-element.xml b/reference/dom/dom/dom-element.xml
index 6359577cb7b2..3df5455fb903 100644
--- a/reference/dom/dom/dom-element.xml
+++ b/reference/dom/dom/dom-element.xml
@@ -248,7 +248,7 @@
&reftitle.notes;
- &dom.note.utf8;
+ &dom.note.modern.utf8;
diff --git a/reference/dom/dom/dom-htmlcollection.xml b/reference/dom/dom/dom-htmlcollection.xml
index a6be17f43e55..6664ba72999e 100644
--- a/reference/dom/dom/dom-htmlcollection.xml
+++ b/reference/dom/dom/dom-htmlcollection.xml
@@ -60,7 +60,7 @@
&reftitle.notes;
- &dom.note.utf8;
+ &dom.note.modern.utf8;
diff --git a/reference/dom/dom/dom-htmldocument.xml b/reference/dom/dom/dom-htmldocument.xml
index 174c59c03665..ce9d564fdae4 100644
--- a/reference/dom/dom/dom-htmldocument.xml
+++ b/reference/dom/dom/dom-htmldocument.xml
@@ -59,7 +59,7 @@
&reftitle.notes;
- &dom.note.utf8;
+ &dom.note.modern.utf8;
diff --git a/reference/dom/dom/dom-htmlelement.xml b/reference/dom/dom/dom-htmlelement.xml
index 8c6db83c654a..e46c08b528e8 100644
--- a/reference/dom/dom/dom-htmlelement.xml
+++ b/reference/dom/dom/dom-htmlelement.xml
@@ -52,7 +52,7 @@
&reftitle.notes;
- &dom.note.utf8;
+ &dom.note.modern.utf8;
diff --git a/reference/dom/dom/dom-namednodemap.xml b/reference/dom/dom/dom-namednodemap.xml
index 67a9b5387474..319913b05b96 100644
--- a/reference/dom/dom/dom-namednodemap.xml
+++ b/reference/dom/dom/dom-namednodemap.xml
@@ -60,7 +60,7 @@
&reftitle.notes;
- &dom.note.utf8;
+ &dom.note.modern.utf8;
diff --git a/reference/dom/dom/dom-node.xml b/reference/dom/dom/dom-node.xml
index b097eb2fedda..036785629a3a 100644
--- a/reference/dom/dom/dom-node.xml
+++ b/reference/dom/dom/dom-node.xml
@@ -291,7 +291,7 @@
&reftitle.notes;
- &dom.note.utf8;
+ &dom.note.modern.utf8;
diff --git a/reference/dom/dom/dom-tokenlist.xml b/reference/dom/dom/dom-tokenlist.xml
index b61e03f6506a..7668819d3291 100644
--- a/reference/dom/dom/dom-tokenlist.xml
+++ b/reference/dom/dom/dom-tokenlist.xml
@@ -75,7 +75,7 @@
&reftitle.notes;
- &dom.note.utf8;
+ &dom.note.modern.utf8;
diff --git a/reference/dom/dom/dom-xmldocument.xml b/reference/dom/dom/dom-xmldocument.xml
index 32f3cb43ec1c..a223ff836ac7 100644
--- a/reference/dom/dom/dom-xmldocument.xml
+++ b/reference/dom/dom/dom-xmldocument.xml
@@ -109,7 +109,7 @@
&reftitle.notes;
- &dom.note.utf8;
+ &dom.note.modern.utf8;
From 06a46412cf26b50c596defc8ab9438791ba16e68 Mon Sep 17 00:00:00 2001
From: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
Date: Thu, 5 Dec 2024 22:17:49 +0100
Subject: [PATCH 45/45] Add note to properties for XMLDocument
---
reference/dom/dom/dom-xmldocument.xml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/reference/dom/dom/dom-xmldocument.xml b/reference/dom/dom/dom-xmldocument.xml
index a223ff836ac7..76ea07c46a6e 100644
--- a/reference/dom/dom/dom-xmldocument.xml
+++ b/reference/dom/dom/dom-xmldocument.xml
@@ -82,6 +82,14 @@
&reftitle.properties;
+
+
+ While the DOMDocument class allows setting certain
+ properties to influence parser behaviour, this class only uses the
+ LIBXML_* constants to
+ configure the parser.
+
+