Back to Intellij Community

HardwiredNamespacePrefix

plugins/xpath/xpath-lang/resources/inspectionDescriptions/HardwiredNamespacePrefix.html

2025.3-rc-2339 B
Original Source

Reports comparisons of the name() function with a string that contains a colon (:). Such usages usually indicate a hardcoded namespace prefix in the comparison. As a result, the code will break when run against XML that uses another prefix for the same namespace.

Example:

<xsl:if test="name() = 'xlink:href'">...<xsl:if>