Code Inspections in XPath
This topic lists all JetBrains Rider code inspections available in XPath.
You can toggle specific inspections or change their severity level on the Editor | Inspection Settings | Inspection Severity | Other Languages page of the IDE settings Ctrl+Alt+S.
Inspection | Description | Default Severity |
---|---|---|
Hardcoded namespace prefix | Reports comparisons of the Example:
<xsl:if test="name() = 'xlink:href'">...<xsl:if>
Powered by XPathView + XSLT-Support | |
Implicit type conversion | Reports implicit conversions between the predefined XPath-types Example:
<xsl:if test="foo" />
is not the same as
<xsl:if test="string(foo)" />
The first test checks whether the element "foo" exists ( Use the following options to configure the inspection:
Powered by XPathView + XSLT-Support | |
Redundant type conversion | Reports unnecessary type conversions. Type conversions are unnecessary when the argument type of a Powered by XPathView + XSLT-Support | |
Unknown element or attribute name | Reports names of elements or attributes that are used in an XPath-expression but are missing in the associated XML files and are not defined in the referenced schemas. Such names are often the result of typos and would otherwise probably only be discovered at runtime. Example:
<xsl:template match="h:txtarea" />
If the Powered by XPathView + XSLT-Support | |
XPath predicate with index 0 | Reports usages of Example:
//someelement[position() = 0] or Powered by XPathView + XSLT-Support |