I am having trouble configuring the Sonar XML plugin. I am trying to run it against the simple xml doc below. I have created a copy of the default xml profile and am trying to write a custom XPath rule. I have made sure that the rule is activated. However, I cant seem to get the XPath rule to fail.
<?xml version="1.0" encoding="ISO-8859-1"?>
<bookstore>
<book>
<title lang="eng">Harry Potter</title>
<price>29.99</price>
</book>
<book>
<title lang="eng">Learning XML</title>
<price>39.95</price>
</book>
</bookstore>
The XPath expression which I am using is:
//@lang='eng'
It does seem to be checking the file as on the dashboard I am able to see the number of lines and the file. However there are never any rules which fail.
In case anyone else runs into the same problem, I built the plugin from source and used that jar instead of the one provided.