From 2132c79c77e62b0d8bd81ebaa581d767950ec37b Mon Sep 17 00:00:00 2001
From: Piotr Tomiak
- This inspection checks whether any element/attribute names that are used in XPath-expressions are actually part of an
- associated XML file or are defined in a referenced schema. This helps to avoid problems caused by typos in
+ Reports any element or attribute names that are used in XPath-expressions, which are not part of an
+ associated XML file and are not defined in a referenced schema. This helps to avoid problems caused by typos in
XPath-expressions that would otherwise occur when running the script and may even then not be recognized immediately.
- This inspection checks for comparisons of the name()-function against strings that contain a ":" - which
+ Reports comparisons of the
- This inspection checks for any implicit conversions between the predefined XPath-types STRING, NUMBER, BOOLEAN and
- NODESET. While this is usually not a problem as the conversions are well-defined by the standard, this inspection can
- help to write XSLT scripts that are more expressive about types and can even help to avoid subtle bugs:
+ Reports any implicit conversions between the predefined XPath-types
diff --git a/plugins/xpath/xpath-lang/resources/inspectionDescriptions/IndexZeroUsage.html b/plugins/xpath/xpath-lang/resources/inspectionDescriptions/IndexZeroUsage.html
index fb09ffdc774f..9a1033e21544 100644
--- a/plugins/xpath/xpath-lang/resources/inspectionDescriptions/IndexZeroUsage.html
+++ b/plugins/xpath/xpath-lang/resources/inspectionDescriptions/IndexZeroUsage.html
@@ -16,8 +16,8 @@
- This inspection checks for any accidental use of zero in a predicate index or in a comparision with the function
-
diff --git a/plugins/xpath/xpath-lang/resources/inspectionDescriptions/RedundantTypeConversion.html b/plugins/xpath/xpath-lang/resources/inspectionDescriptions/RedundantTypeConversion.html
index a85a145c4554..5f9963e46e89 100644
--- a/plugins/xpath/xpath-lang/resources/inspectionDescriptions/RedundantTypeConversion.html
+++ b/plugins/xpath/xpath-lang/resources/inspectionDescriptions/RedundantTypeConversion.html
@@ -16,8 +16,8 @@
- This inspection checks whether any type-conversion with the functions
- This inspection checks for problems in invocations of named XSLT templates, such as missing arguments, passing
+ Reports problems in invocations of named XSLT templates, such as missing arguments, passing
arguments that are not declared by the template or passing an argument for a certain parameter more than once.
name() function against strings that contain a ':', which
usually indicates a hardwired namespace-prefix in the comparison. Such code will break when run against XML that
uses a different prefix for the same namespace.
STRING, NUMBER, BOOLEAN
+ and NODESET. While this is usually not a problem as the conversions are well-defined by the standard,
+ this inspection can help to write XSLT scripts that are more expressive about types and can even help to avoid subtle bugs:
position(). Such is almost always a bug because in XPath, the index starts at one, not at zero.
+ Reports accidental usage of zero in a predicate index or in a comparison with the function
+ position(). Such usage is almost always a bug because in XPath, the index starts at one, not at zero.
string(), number() or
- boolean() is redundant, i.e. whether the type of argument is the same as the functions return type or if
+ Reports type-conversions with functions string(), number() or
+ boolean(), which are redundant. I.e. whether the type of argument is the same as the functions return type or if
the expected type of the expression is of type "any". While such an explicit conversion may sometimes be intentional
to emphasize the type, this can usually be safely removed.
- This inspections checks for shadowed XSLT variables which can lead to possibly undesired effects. + Reports shadowed XSLT variables which can lead to possibly undesired effects.
diff --git a/plugins/xpath/xpath-lang/resources/messages/XPathBundle.properties b/plugins/xpath/xpath-lang/resources/messages/XPathBundle.properties index 66b12c090cdd..5049b65a0430 100644 --- a/plugins/xpath/xpath-lang/resources/messages/XPathBundle.properties +++ b/plugins/xpath/xpath-lang/resources/messages/XPathBundle.properties @@ -101,7 +101,7 @@ dialog.message.cannot.perform.refactoring=Cannot perform refactoring.\n{0} dialog.message.custom.functions.require.prefixed.name=Custom functions require a prefixed name dialog.message.error.in.xpath.expression.for.variable=Error in XPath Expression for Variable ''{0}'': {1} dialog.message.error.while.evaluating.xpath=Error while evaluating XPath:\n{0} -dialog.message.expression.produced=Expression produced +dialog.message.expression.produced=Expression produced dialog.message.function.name=Function name: dialog.message.inline.local.variable=Inline {0} ''{1}''? ({2} local {2, choice, 1#occurrence|1