I code custom search result page on Sharepoint.
I’ve got a problem with XSLT.
Search result from SP is something like:
<Result>
...
<url>http://server/_bdc/name/source.aspx?id=444</url>
...
</Result>
But I want to make own link, from this url variable I want to cut only the id (444):
<a href="http://mynewlink/page.aspx?id=444">MyResult</a>
I tried something like (based on standard SP template)
...
<a>
<xsl:attribute name="href">
{concat('http://mynewlink/page.aspx?id=', substring-after("{url}", "="))}
</xsl:attribute>
</a>
...
but it didn’t work – I don’t know where put this concat…
Your code is “almost” correct, start by replacing:
with:
Here is a complete transformation:
When this is applied on the provided XML document:
the wanted, correct result is produced: