180 likes | 258 Vues
Learn XSLT fundamentals, SharePoint integration, customization techniques, and deployment practices for enhancing web parts.
E N D
Rick Wise RJB Technical Consulting www.rjbtech.com rick.wise@rjbtech.com Using XSLT with Custom Web Parts
Agenda • What is XSLT? • XSLT within SharePoint • Where is it stored? • How it is used? • Customizing Web Parts
What is XSLT? • eXtensibleStylesheet Language Transformations • Used to format XML
What is XSLT? • Example - XML
What is XSLT? • Example - XSL
What is XSLT? • Output
What is XSLT? • Processing XML XSL Processor HTML
What is XSLT? • Common Tags <xsl:stylesheet name=“stylesheetName”> <xsl:template match=“/”> <xsl:value-of select=“@tagName”>
Helpful Code • Output
Using Variables • <xsl:variable name = “name”> <xsl:value-of select = “@xmlItem”/> </variable> • Refer to as: • <xsl:value-of select=“$name”> • {$name}
Where is it stored? • ItemStyle.xsl • Style Library/XSL Style Sheets/ItemStyle.xsl • Webpart file • .webpart
XSLT within SharePoint • Call Template <xsl:call-template name=“template2”> • Call a nested template • Looping through items • Keeps HTML output cleaner
XSLT within SharePoint • Mimmick OOB Web parts • SharePoint Designer • Convert to XSL Data View
XSLT within SharePoint • Deployment • ItemStyle.xsl • XSL Styles Sheets • Individual Web Parts • Web Part Gallery - Miscellaneous