If there's a category which has no annotations, it nests within another category in the Web View output. Fix this. Categories with no annotations should not be included in the category list for output; or the XSL should ignore them. Whichever is easiest.