XSLT Basics

Apostrophe in Xslt

21/10/2013 14:09
Apostrophe in Xslt   Trying to render apostrophe ' with xslt - add apostrophes to string - Unable to use ' named char in concat function - Unable to use ' html escape in concat function   Only use what worked was direct or assigning to a variable as you see in...

New item link in pop-up window

18/10/2013 16:53
New item link for Content Query Web Part to open in popup window This is a part of Xslt of Main plusIcon.png and MyStyle.css is uploaded to /Style library/MyFolder  <xsl:template match="/">   <link rel="stylesheet" type="text/css" href="/Style...

Create edit item link in Xslt

11/10/2013 11:19
Create Edit item link for Content query web part   Sometimes you want to create edit link to list item (not the aspx page) in Content query web part. In this example, Item title is used like header and contains link to item itself in popup window.   Use this templates and code in...

Trim FileName from Url, revert string

11/10/2013 10:11
<?xml version="1.0" encoding="iso-8859-1"?>     <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">         <xsl:template...

Add xsl attribute to HTML tag

09/01/2013 14:28
<a>     <xsl:attribute name="href">         <xsl:value-of select="http://server/site/page.aspx" />     </xsl:attribute>     My Page </a>   or you...

Xslt select attribute of element

09/01/2013 14:16
In case we have $Rows variable and want to take 'Title' attribute from first row of $Rows <xsl:value-of select="$Rows[1]/@Title"/>   or in Content Query web part xml - Get listId of second Row element (321) - index start is 1, not 0 <xsl:value-of...

DateTime format in Xslt

09/01/2013 14:08
Format Date in Xslt 1. Add ddwrt namespace to xslt file header xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime"   2. Use ddwrt functions  <xsl:value-of select="ddwrt:FormatDateTime(@Created, 1033, 'd MMMM yyyy')" /> for 14 january...

Add empty space with Xslt

17/12/2012 12:12
<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>

Xml variable in Xslt

08/12/2012 14:48
  <?xml version="1.0" encoding="utf-8"?>     <xsl:stylesheet...

Xslt For loop example

08/12/2012 11:53
<?xml version="1.0" encoding="utf-8"?> <!-- Edited by Lukas Sevcik® -->     <xsl:stylesheet version="1.0"     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">         <xsl:template...
1 | 2 >>