I am also facing same kind of issue, I am trying to validate if a file name weblogic.xml, If the file doesn’t have declared the attribute names as page-check-seconds then report violation.
filePattern : weblogic.xml
The XPath query = not(//jsp-descriptor/jsp-param/param-name[text()=‘page-check-seconds’])
Message : Page check seconds are not mentioned
File content:<?xml version="1.0" encoding="UTF-8"?> keepgenerated true page-check-sec true
But I am not able to see any sonar violation , I an scanning file using sonar-scanner. I am using soanrqube 7.2.
PS: I am novice to SonarQube