
10
Web Parts and XSLT
WHAT’S IN THIS CHAPTER?
An overview of what Web Parts are and how they are used in
➤
SharePoint
How to use the Content Editor Web Part to add CSS and JavaScript
➤
to a page
How XSL is used to style XML data
➤
How to use the XML Viewer Web Part to leverage XML and XSL in
➤
SharePoint 2010
How to use the XSLT List View Web Part
➤
How to use the Content Query Web Part
➤
The previous chapter introduced Web Parts and how to use them to create great looking
pages. This is certainly a great use for Web Parts, but there are many more uses for them in
SharePoint. This chapter dives a bit deeper by describing examples of how to create dynamic
content on your site by using some out-of-the-box Web Parts in SharePoint 2010.
Many of the out-of-the-box SharePoint Web Parts utilize XML (Extensible Markup Language)
to bring data out of SharePoint for displaying on the screen. However, XML alone would be
pretty terrible to look at, since it’s meant to be read by computers, not humans. This is why XSL
(Extensible Stylesheet Language) and XSLT (Extensible Stylesheet Language Translations) were
created: to provide a simple mechanism for applying stylistic changes to XML, often to translate
it from raw data into human-readable formats such as HTML. SharePoint leverages XML and
XSL heavily in Web Parts to allow designers and developers to customize the appearance of data.
Also, note th