XSLT Basics

Common Xslt function

08/12/2012 11:13
Starts-With if url starts with http <xsl:when test="starts-with('https://www.google.com','http')"> ... </xsl:when>   Replace text using translate(inText, what, with) title is node value {token} - text to replace $days is variable normalize-space is used to trim...

Basic XPath syntax

08/12/2012 11:08
  XPath Syntax    Article copied from W3Schools: https://www.w3schools.com/xpath/xpath_syntax.asp The XML Example Document We will use the following XML document in the examples below. <?xml version="1.0"...

Xslt comparison operators

08/12/2012 01:59


08/12/2012 00:51
Examle taken from Xslt W3 Schools: https://www.w3schools.com/xsl/tryxslt.asp?xmlfile=cdcatalog&xsltfile=cdcatalog_apply xslt file: <?xml version="1.0" encoding="ISO-8859-1"?> <!-- Edited by XMLSpy® --> <xsl:stylesheet...

XSLT function (template) syntax

06/12/2012 13:57
Simple code translated from C# to Xslt public static void main() { int number1 = 10; int number2 = 12;     Console.Write("{0}", number1);     Console.Write("{0}", (number1 > number2?"-", "+"));     Console.Write("{0}",...

Content Query Web Part - Identity Transform

16/11/2012 10:03
open the ContentQueryMain.xsl file in your favourite XSL editor or text editor, and locate the template root node Change the inner XML of this node to dump out the xml content by surrounding it in TEXTAREA tag   <xsl:template match="/">     <TEXTAREA...
<< 1 | 2