The following xwiki/2.1 syntax code:
generates the following html output:
The problem seems to occur when the include macro is used next to the velocity macro (possibly other inline macros that support wiki syntax?) and inside that macro, a group is defined.
Those empty paragraphs generated before and after the include-velocity macro pair can cause HTML validation problems
Note: when the included document does exist and contain content, the output is this:
Workaround for getting rid of the paragraphs: