Didn't use the right kind of comments and fell foul of this gotcha http://en.wikibooks.org/wiki/XQuery/Gotchas#Comments Except what I really want to do is comment a line in a direct constructor and whichever type of comment I use it's going to appear in the output and I don't want it to.