This will show you how to correctly link the creator of an item to their mysite in a Content Query WebPart.
Step 1:
Declare the variable “authormysite” and the author string of “UserLookup”. We pull the “Login” parameter, because the username is what is appended on the mysite link out of the box.
<xsl:variable name="authormysite">
<xsl:value-of select="ddwrt:UserLookup(string(@Author) ,'Login')" />
</xsl:variable>
Step 2:
Create the link to the mysite page, appending the new variable’s value that you just created.
< a href="https://m.isb.bj.edu.cn/Person.aspx?accountname={$authormysite}" ></ a>
Step 3:
Within the link, you want to declare the value of @Author to get their full display name.
<xsl:value-of select="@Author" />
Final code:
<xsl:template name="mysitelink" match="Row[@Style='mysitelink']" mode="itemstyle">
<xsl:variable name="authormysite">
<xsl:value-of select="ddwrt:UserLookup(string(@Author) ,'Login')" />
</xsl:variable>
< a href="https://m.isb.bj.edu.cn/Person.aspx?accountname={$authormysite}">
<xsl:value-of select="@Author" />
</ a>
</xsl:template>
