Top Banner
Elio Struyf An introduction to XSLT in SharePoint #SPSBE #SPSBE07
19

Introduction to XSLT SPSBE07

May 24, 2015

Download

Technology

Elio Struyf

This is the "Introduction to XSLT" presentation from SharePoint Saturday Belgium.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to XSLT SPSBE07

Elio Struyf

An introduction to XSLT in SharePoint

#SPSBE

#SPSBE07

Page 2: Introduction to XSLT SPSBE07

About me

• Elio Struyf

• SharePoint Consultant at Xylos

• Brander / Developer

• Twitter: eliostruyf

• Blog: http://estruyf.be/blog

@eliostruyf - #SPSBE07

Page 3: Introduction to XSLT SPSBE07

A big thanks to our sponsors

Venue Sponsor

Platinum Sponsors

Gold Premium Sponsors

Gold Sponsors

@eliostruyf - #SPSBE07

Page 4: Introduction to XSLT SPSBE07

Agenda

• What is XSLT?

• Why use XSLT?

• Where to begin

• Demo’s

@eliostruyf - #SPSBE07

Page 5: Introduction to XSLT SPSBE07

Value = 1Value = 3Value = 5Value = 8Value = 2Value = 1

Total = 20

WHAT IS XSLT

• Extensible Stylesheet Language Transformations• Transforming XML data into something else, ex: HTML

• XSLT >= CSS

First name

Last name

Last name

First nameCombined

XML Doc 1

XML Doc 2

@eliostruyf - #SPSBE07

Page 6: Introduction to XSLT SPSBE07

COMPARISON WITH CSS

@eliostruyf - #SPSBE07

Page 7: Introduction to XSLT SPSBE07

WHAT IS XSLTXML Data

XSL Stylesheet

Output

Processor

Page 8: Introduction to XSLT SPSBE07

XSLT EXAMPLE

http://bit.ly/HwJv7G

@eliostruyf - #SPSBE07

Page 9: Introduction to XSLT SPSBE07

WHY USE XSLT?• It allows you to filter and sort the data

• Apply your own styling and formatting

• Style your data in different formats

• Doing calculations

• Easy to use in SharePoint

@eliostruyf - #SPSBE07

Page 10: Introduction to XSLT SPSBE07

START USING IT!• Good to know: SP 2007 / 2010 = XSLT 1.0

• SP2010 List views are created with XSLT

• “XSLT is a tool, not a religion” – Doug Tidwell

@eliostruyf - #SPSBE07

Page 11: Introduction to XSLT SPSBE07

DEMOData View Web Part: Selecting data

@eliostruyf - #SPSBE07

Page 12: Introduction to XSLT SPSBE07

SELECTING DATA

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

• <xsl:value-of select="substring-after(@Priority, ') ')" />

@eliostruyf - #SPSBE07

Page 13: Introduction to XSLT SPSBE07

DEMOList View: Statements

@eliostruyf - #SPSBE07

Page 14: Introduction to XSLT SPSBE07

CONDITIONAL FORMATING• If Statements: <xsl:if test=“”></xsl:if>

• Choose Element: <xsl:choose><xsl:when test=“”/><xsl:otherwise /></xsl:choose>

@eliostruyf - #SPSBE07

Page 15: Introduction to XSLT SPSBE07

DEMOTwitter Demo

@eliostruyf - #SPSBE07

Page 16: Introduction to XSLT SPSBE07

SHOW HTML CONTENT• disable-output-escaping=“no”

• “<“ ”&lt;”

• disable-output-escaping=“yes”

• “<“ “<“

@eliostruyf - #SPSBE07

Page 17: Introduction to XSLT SPSBE07

DEMOFiddler – Retrieving the raw XML

http://bit.ly/IrsPwU

@eliostruyf - #SPSBE07

Page 18: Introduction to XSLT SPSBE07

THANK YOU!Feedback via Twitter: #SPSBE07

@eliostruyf - #SPSBE07

Page 19: Introduction to XSLT SPSBE07

We need your feedback!

Scan this QR code or visit http://svy.mk/sps2012be

Our sponsors: