Using the content query part is fairly straightforward but there are two things you must remember:
- The columns you are filtering on have to be site columns
- If you find some of your list fields aren't available to your itemstyle.xsl, it's likely you'll have to modify the web part's xml. In order to do this complete the following steps.
- Click the verb menu of the web part and choose to export the part to your file system
- Open the .webpart file on your file system and find the 'CommonViewFields' property and add your field and its type.
- Delete the old webpart from your page and reimport the webpart (click Add a web part to this zone then use the advanced settings to import, the import option is in the dropdown by the little triangle in the advanced settings)
- Now your field will be accessible by itemstyles.xsl code.