Sometimes it’s helpful to see exactly what your CQW is receiving. Put this into a style and see what properties and data you’re receiving:
<xsl:for-each select="@*">
P:<xsl:value-of select="name()" /><br/>
V:<xsl:value-of select="." /><br/>
</xsl:for-each>