From a655b4f03347438126b44c3666dd5769c93cc1cf Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Tue, 28 May 2024 18:29:04 +0100 Subject: [PATCH] Improve the wording about matching document nodes --- gradle.properties | 2 ++ step-validation/src/main/xml/specification.xml | 4 ++-- steps/src/main/xml/steps/hash.xml | 5 ++--- steps/src/main/xml/steps/replace.xml | 7 +++---- steps/src/main/xml/steps/string-replace.xml | 5 ++--- steps/src/main/xml/steps/uuid.xml | 5 ++--- 6 files changed, 13 insertions(+), 15 deletions(-) diff --git a/gradle.properties b/gradle.properties index 6df12322..d6c62d68 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,5 @@ +org.gradle.jvmargs=-Xmx4096M + docbookXsltBaseUri=https://cdn.docbook.org docbookXsltVersion=2.5.0 xprocTocUri=https://spec.xproc.org/master/head/etc/xproc/toc.xml diff --git a/step-validation/src/main/xml/specification.xml b/step-validation/src/main/xml/specification.xml index 18ce2fab..e19863e5 100644 --- a/step-validation/src/main/xml/specification.xml +++ b/step-validation/src/main/xml/specification.xml @@ -469,9 +469,9 @@ No document properties on the schemas port are preserved. The option can be used to - control the schema's version in case it does not specify one itself. If + control the schema's version in case it does not specify one itself.If the schema does not specify a version and option - is empty, the version used is implementation-defined. + is empty, the version used is implementation-defined. It is a dynamic error if the selected version is not supported. diff --git a/steps/src/main/xml/steps/hash.xml b/steps/src/main/xml/steps/hash.xml index 4ab83385..480bac97 100644 --- a/steps/src/main/xml/steps/hash.xml +++ b/steps/src/main/xml/steps/hash.xml @@ -61,9 +61,8 @@ value of the attribute in the output. If the attribute is named “xml:base”, the base URI of the element must also be amended accordingly. -If the document node is matched, the entire document is replaced by a text node -with the hash. What appears on port result is a text document with the -text node wrapped in a document node. +If the document node is matched, the result is a document node +containing a single text node. If the expression matches any other kind of node, the entire node (and not just diff --git a/steps/src/main/xml/steps/replace.xml b/steps/src/main/xml/steps/replace.xml index 5e261f3f..ef6287df 100644 --- a/steps/src/main/xml/steps/replace.xml +++ b/steps/src/main/xml/steps/replace.xml @@ -27,10 +27,9 @@ pattern is replaced in the output by the top-level node(s) of the replacement document. Only non-nested matches are replaced. That is, once a node is replaced, its descendants cannot be matched. - -If the document node is matched and port replacement contains -a text document, the entire document is replaced by the text node. What appears on port -result is a text document with the text node wrapped in a document node. + +If the document node is matched, the result is a document node +containing the replacement. Document properties diff --git a/steps/src/main/xml/steps/string-replace.xml b/steps/src/main/xml/steps/string-replace.xml index 4477cbd7..8af2ed5f 100644 --- a/steps/src/main/xml/steps/string-replace.xml +++ b/steps/src/main/xml/steps/string-replace.xml @@ -37,9 +37,8 @@ expression is used as the new value of the attribute in the output. If the attribute is named “xml:base”, the base URI of the element must also be amended accordingly. -If the document node is matched, the entire document is replaced by the string -value of the expression. What appears on port result -is a text document with the text node wrapped in a document node. +If the document node is matched, the result is a document node +containing a single text node. If the expression matches any other kind of node, the entire node (and not just its contents) is replaced by diff --git a/steps/src/main/xml/steps/uuid.xml b/steps/src/main/xml/steps/uuid.xml index 98e880d4..ca773fc4 100644 --- a/steps/src/main/xml/steps/uuid.xml +++ b/steps/src/main/xml/steps/uuid.xml @@ -45,9 +45,8 @@ matches an attribute, the UUID is used as the new value of the attribute in the output. If the attribute is named “xml:base”, the base URI of the element must also be amended accordingly. -If the document node is matched, the entire document is replaced by a text node -with the UUID. What appears on port result is a text document with the -text node wrapped in a document node. +If the document node is matched, the result is a document node +containing a single text node. If the expression matches any other kind of node, the entire node (and not just