Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm following the XPath Resource Expressions example to retrieve resources in an XSLT within SharePoint 2010. This is illustrated in the following simplified code:

<xsl:template name="fldTypes" ... >
    <xsl:param name="thisNode" select="."/>
    <xsl:param name="DocId" select="$thisNode/@*[name()=current()/@Name]"/>
    <span>
        <xsl:value-of select="$thisNode/../@resource.wss.fldtype_attachment_alttex" />
    </span>
</xsl:template>

Now this works, but I orginally had the following which doesn't work:

<xsl:value-of select="@Resource.wss.fldtype_attachment_alttex" />

I assumed this would work based on the example given in the tutorial, specifically this line:

<xsl:value-of select=”@Resources.resfile.resname” />

Now, my question is why is the $thisNode/../ prefix necessary? Is it something to do with being inside an xsl:template?

share|improve this question
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.