From 06253f9a62af958f07320a52690a4d3f873b32f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1t=C3=A9=20Kocsis?= Date: Sat, 21 Mar 2026 14:42:59 +0100 Subject: [PATCH] Document each global ext/dom constant on its own row Related to https://github.com/php/php-src/pull/21484 --- reference/dom/constants.xml | 195 ++++++++++++++++++++++++++++++++---- 1 file changed, 177 insertions(+), 18 deletions(-) diff --git a/reference/dom/constants.xml b/reference/dom/constants.xml index 6e74b04eac90..1d4f1b372e78 100644 --- a/reference/dom/constants.xml +++ b/reference/dom/constants.xml @@ -251,7 +251,7 @@ - + Dom\HTML_NO_DEFAULT_NS (int) @@ -287,7 +287,7 @@ - + DOM_PHP_ERR (int) @@ -300,9 +300,19 @@ out-of-memory situations. + + + DOM_INDEX_SIZE_ERR + (int) + + 1 + + If index or size is negative, or greater than the allowed value. + + - DOM_INDEX_SIZE_ERR / Dom\INDEX_SIZE_ERR + Dom\INDEX_SIZE_ERR (int) 1 @@ -312,7 +322,18 @@ - DOMSTRING_SIZE_ERR / Dom\STRING_SIZE_ERR + DOMSTRING_SIZE_ERR + (int) + + 2 + + If the specified range of text does not fit into a + string. + + + + + Dom\STRING_SIZE_ERR (int) 2 @@ -321,17 +342,35 @@ string. + + + DOM_HIERARCHY_REQUEST_ERR + (int) + + 3 + If any node is inserted somewhere it doesn't belong + - DOM_HIERARCHY_REQUEST_ERR / Dom\HIERARCHY_REQUEST_ERR + Dom\HIERARCHY_REQUEST_ERR (int) 3 If any node is inserted somewhere it doesn't belong + + + DOM_WRONG_DOCUMENT_ERR + (int) + + 4 + + If a node is used in a different document than the one that created it. + + - DOM_WRONG_DOCUMENT_ERR / Dom\WRONG_DOCUMENT_ERR + Dom\WRONG_DOCUMENT_ERR (int) 4 @@ -339,9 +378,19 @@ If a node is used in a different document than the one that created it. + + + DOM_INVALID_CHARACTER_ERR + (int) + + 5 + + If an invalid or illegal character is specified, such as in a name. + + - DOM_INVALID_CHARACTER_ERR / Dom\INVALID_CHARACTER_ERR + Dom\INVALID_CHARACTER_ERR (int) 5 @@ -349,9 +398,19 @@ If an invalid or illegal character is specified, such as in a name. + + + DOM_NO_DATA_ALLOWED_ERR + (int) + + 6 + + If data is specified for a node which does not support data. + + - DOM_NO_DATA_ALLOWED_ERR / Dom\NO_DATA_ALLOWED_ERR + Dom\NO_DATA_ALLOWED_ERR (int) 6 @@ -359,9 +418,19 @@ If data is specified for a node which does not support data. + + + DOM_NO_MODIFICATION_ALLOWED_ERR + (int) + + 7 + + If an attempt is made to modify an object where modifications are not allowed. + + - DOM_NO_MODIFICATION_ALLOWED_ERR / Dom\NO_MODIFICATION_ALLOWED_ERR + Dom\NO_MODIFICATION_ALLOWED_ERR (int) 7 @@ -369,9 +438,19 @@ If an attempt is made to modify an object where modifications are not allowed. + + + DOM_NOT_FOUND_ERR + (int) + + 8 + + If an attempt is made to reference a node in a context where it does not exist. + + - DOM_NOT_FOUND_ERR / Dom\NOT_FOUND_ERR + Dom\NOT_FOUND_ERR (int) 8 @@ -379,9 +458,19 @@ If an attempt is made to reference a node in a context where it does not exist. + + + DOM_NOT_SUPPORTED_ERR + (int) + + 9 + + If the implementation does not support the requested type of object or operation. + + - DOM_NOT_SUPPORTED_ERR / Dom\NOT_SUPPORTED_ERR + Dom\NOT_SUPPORTED_ERR (int) 9 @@ -389,9 +478,19 @@ If the implementation does not support the requested type of object or operation. + + + DOM_INUSE_ATTRIBUTE_ERR + (int) + + 10 + + If an attempt is made to add an attribute that is already in use elsewhere. + + - DOM_INUSE_ATTRIBUTE_ERR / Dom\INUSE_ATTRIBUTE_ERR + Dom\INUSE_ATTRIBUTE_ERR (int) 10 @@ -399,9 +498,19 @@ If an attempt is made to add an attribute that is already in use elsewhere. + + + DOM_INVALID_STATE_ERR + (int) + + 11 + + If an attempt is made to use an object that is not, or is no longer, usable. + + - DOM_INVALID_STATE_ERR / Dom\INVALID_STATE_ERR + Dom\INVALID_STATE_ERR (int) 11 @@ -409,25 +518,52 @@ If an attempt is made to use an object that is not, or is no longer, usable. + + + DOM_SYNTAX_ERR + (int) + + 12 + If an invalid or illegal string is specified. + - DOM_SYNTAX_ERR / Dom\SYNTAX_ERR + Dom\SYNTAX_ERR (int) 12 If an invalid or illegal string is specified. + + + DOM_INVALID_MODIFICATION_ERR + (int) + + 13 + If an attempt is made to modify the type of the underlying object. + - DOM_INVALID_MODIFICATION_ERR / Dom\INVALID_MODIFICATION_ERR + Dom\INVALID_MODIFICATION_ERR (int) 13 If an attempt is made to modify the type of the underlying object. + + + DOM_NAMESPACE_ERR + (int) + + 14 + + If an attempt is made to create or change an object in a way which is + incorrect with regard to namespaces. + + - DOM_NAMESPACE_ERR / Dom\NAMESPACE_ERR + Dom\NAMESPACE_ERR (int) 14 @@ -436,9 +572,19 @@ incorrect with regard to namespaces. + + + DOM_INVALID_ACCESS_ERR + (int) + + 15 + + If a parameter or an operation is not supported by the underlying object. + + - DOM_INVALID_ACCESS_ERR / Dom\INVALID_ACCESS_ERR + Dom\INVALID_ACCESS_ERR (int) 15 @@ -446,9 +592,22 @@ If a parameter or an operation is not supported by the underlying object. + + + DOM_VALIDATION_ERR + (int) + + 16 + + If a call to a method such as insertBefore or removeChild would make the Node + invalid with respect to "partial validity", this exception would be raised and + the operation would not be done. + + + - DOM_VALIDATION_ERR / Dom\VALIDATION_ERR + Dom\VALIDATION_ERR (int) 16