diff --git a/docs/_data/xpath_funs.yml b/docs/_data/xpath_funs.yml index 8f76da9f9e..86041d65cc 100644 --- a/docs/_data/xpath_funs.yml +++ b/docs/_data/xpath_funs.yml @@ -13,6 +13,7 @@ aliases: description: "Any element node" - &needs_typenode "The context node must be a {% jdoc jast::TypeNode %}" - ¬_ctx_dependent "The function is not context-dependent, but takes a node as its first parameter." + - &needs_node_ctx "The requires the context node to be an element" langs: - name: "Any language" @@ -21,11 +22,12 @@ langs: - name: fileName returnType: "xs:string" shortDescription: "Returns the simple name of the current file" - description: "Returns the current simple filename without path but including the extension. - This can be used to write rules that check filename naming conventions. + description: | + Returns the current simple file name, without path but including the extension. + This can be used to write rules that check file naming conventions. -
This function is available since PMD 6.38.0.
" - notes: "The function can be called on any node." + since: 6.38.0 + notes: *needs_node_ctx examples: - code: "//b[pmd:fileName() = 'Foo.xml']" outcome: "Matches any `<b>` tags in files called `Foo.xml`." @@ -35,10 +37,11 @@ langs: parameters: - *node_param shortDescription: "Returns the begin line of the given node" - description: "Returns the begin line of the given node in the source text. - Line numbers are 1-based. + description: | + Returns the line where the node starts in the source file. + Line numbers are 1-based. -This function is available since PMD 6.44.0.
" + since: 6.44.0 notes: *not_ctx_dependent examples: - code: "//b[pmd:beginLine(.) > 5]" @@ -49,10 +52,11 @@ langs: parameters: - *node_param shortDescription: "Returns the end line of the given node" - description: "Returns the end line of the given node in the source text. - Line numbers are 1-based. + description: | + Returns the line where the node ends in the source file. + Line numbers are 1-based. -This function is available since PMD 6.44.0.
" + since: 6.44.0 notes: *not_ctx_dependent examples: - code: "//b[pmd:endLine(.) == pmd:beginLine(.)]" diff --git a/docs/_includes/custom/xpath_fun_doc.html b/docs/_includes/custom/xpath_fun_doc.html index 12a7781adf..555f1e2f01 100644 --- a/docs/_includes/custom/xpath_fun_doc.html +++ b/docs/_includes/custom/xpath_fun_doc.html @@ -50,6 +50,10 @@