Question

I am editing ItemStyle.xsl to display documents in a web part. I need to display the value of a choice field whose name unfortunately contains a forward slash and I don't get it to display its value. So far I tried:

<xsl:value-of select="@Slash_x002f_Column"/>
<xsl:value-of select="Slash_x002f_Column"/>

I even tried to create a variable using

<xsl:variable name="SlashColumn" select="Slash_x002f_Column" />
<xsl:variable name="SlashColumn" select="@Slash_x002f_Column" />

and thus

<xsl:value-of select="$Slash_x002f_Column"/>

The column has two choices, so nothing too strange. Some attempts even rendered the whole page unusable. What do I need to do? Thank you

Was it helpful?

Solution

After a few hours of struggle I finally found the solution to my problem:

<xsl:value-of select="@SlashColumn" />

this means that SharePoint is apparently contracting the internal name and omitting the slash (_x002f_) in the internal field name (Slash_x002f_Column).

What actually happened if I had a field with the internal name SlashColumn?

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top