PhpStorm 2021.1 Help

Code Inspection: Check node test



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 XPath-expressions that would otherwise occur when running the script and may even then not be recognized immediately.

Example:

<xsl:template match="h:txtarea"/>

If the prefix "h" is bound to the XHTML namespace, the inspection will flag this part of the match-expression as an unknown element name because the correct name of the element is "textarea".

Powered by XPathView + XSLT-Support

Suppress an inspection in the editor

  1. Position the caret at the highlighted line and press Alt+Enter or click the Intention action icon.

  2. Click the arrow next to the inspection you want to suppress and select the necessary suppress action.

Last modified: 07 July 2021