Вопрос

This is driving me slightly potty!

I have a datasheet webpart and I would like to add a hyperlink to one of the columns to open the item in the popout/modal fashion.

So far I have:

<a><xsl:attribute name="href">
<xsl:value-of select="concat('https://mysite/_layouts/listform.aspx?PageType=4&ListId={listiD}&ID=',@ID,'&ContentTypeID=0x0100B0D8940B0260E54DA1649533F29D58D7')"/>
</xsl:attribute>
<xsl:value-of select="@Title" /></a></td>

(I have edited the above code to remove identifying features)

The error that I am getting is "This Web Part does not have a valid XSLT stylesheet. Error: A semi colon character was expected"

I really don't know what to do to fix this!

Thanks in advance,

MW

Это было полезно?

Решение

This is because of the use of the ampersand & in your statement. It needs to be escaped as &amp; to stop XSTL trying to treat the following characters as an entity.

Try this instead:

<xsl:value-of select="concat('https://mysite/_layouts/listform.aspx?PageType=4&amp;ListId={listiD}&amp;ID=',@ID,'&amp;ContentTypeID=0x0100B0D8940B0260E54DA1649533F29D58D7')"/>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top