1 / 18

Using XSLT with Custom Web Parts

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?. eXtensible Stylesheet Language Transformations

bonner
Télécharger la présentation

Using XSLT with Custom Web Parts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Rick Wise RJB Technical Consulting www.rjbtech.com rick.wise@rjbtech.com Using XSLT with Custom Web Parts

  2. Agenda • What is XSLT? • XSLT within SharePoint • Where is it stored? • How it is used? • Customizing Web Parts

  3. What is XSLT? • eXtensibleStylesheet Language Transformations • Used to format XML

  4. What is XSLT? • Example - XML

  5. What is XSLT? • Example - XSL

  6. What is XSLT? • Output

  7. What is XSLT? • Processing XML XSL Processor HTML

  8. What is XSLT? • Common Tags <xsl:stylesheet name=“stylesheetName”> <xsl:template match=“/”> <xsl:value-of select=“@tagName”>

  9. Helpful Code

  10. Helpful Code

  11. Helpful Code • Output

  12. Using Variables • <xsl:variable name = “name”> <xsl:value-of select = “@xmlItem”/> </variable> • Refer to as: • <xsl:value-of select=“$name”> • {$name}

  13. Where is it stored? • ItemStyle.xsl • Style Library/XSL Style Sheets/ItemStyle.xsl • Webpart file • .webpart

  14. XSLT within SharePoint • Call Template <xsl:call-template name=“template2”> • Call a nested template • Looping through items • Keeps HTML output cleaner

  15. XSLT within SharePoint • Mimmick OOB Web parts • SharePoint Designer • Convert to XSL Data View

  16. XSLT within SharePoint

  17. XSLT within SharePoint • Deployment • ItemStyle.xsl • XSL Styles Sheets • Individual Web Parts • Web Part Gallery - Miscellaneous

  18. Demo

More Related