SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wrote this code in itemstyle.xsl

    <xsl:variable name="AssistPrinEmail">
        <xsl:value-of select="substring-after(@AssistantPrincipal1Email,',')" />
    <xsl:variable name="AssistPrinEmail2">
        <xsl:value-of select="substring-after(@AssistantPrincipal2Email,',')" />
    <xsl:variable name="AssistPrinEmail3">
        <xsl:value-of select="substring-after(@AssistantPrincipal3Email,',')" />
    <xsl:variable name="AssistPrinEmail4">
        <xsl:value-of select="substring-after(@AssistantPrincipal4Email,',')" />

I would think that four slots would appear in a CQWP using that style. They would be AssistantPrincipal1Email, AssistantPrincipal2Email, AssistantPrincipal3Email, and AssistantPrincipal4Email. This is not the case. The slots are not appearing in the toolbar.

Any idea why these slots are not displaying?

share|improve this question

Did you try:

<xsl:variable name="AssistPrinEmail" select="@AssistantPrincipal1Email"/>

To make sure the slots are working without the 'substring-after' selection?

share|improve this answer
I tried that. What I eventually did was add the fields to the CommonViewFields section in the webpart xsl. That forced the fields to work. They still didn't appear as slots but at least the content worked. You shouldn't HAVE to do that, but CQWP and slots are buggy/broken in SP2010. I hope things get better with SP1. – Brian Bolton Aug 22 '11 at 11:46
You also have to declare slots as variables at the FIRST level of the template, that's where the CQWP slots parser is expecting them. I know this is late to the party, but this works fine in SP1. – James Love Apr 22 '12 at 9:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.