Mar 16
Last week I took and passed the 70-541 exam – TS: Microsoft Windows SharePoint Services 3.0 – Application Development.
I actually took the same exam a few years back when it was in beta and without enough knowledge about WSS 3.0. This time however, I felt that I had gained the necessary experience, I also took the time to read up on a few topics where I felt that my knowledge was lacking. I read the the book Inside Microsoft Windows SharePoint Services 3.0 by Ted Pattison and Daniel Larsson and would highly recommend it to anyone starting SharePoint WSS 3.0 development.
I am not sure where to go next. Perhaps the MOSS exam or the more general ASP.NET Web Development exam. I do work mostly on MOSS projects, but again there are a few topics that I am sure requires some development before I am ready for the MOSS exam.
Mar 03
Xml template
When implementing custom XSLT templates I almost always need to know the XML output of the controls or webparts to customize. Some of the webpart shows examples of the XML output, but most of the time this is useless. Based on the webpart settings different XML is emitted from the webpart. To get the actual XML I use a small XSLT template that renders the XML output:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/">
<xmp>
<xsl:copy-of select="*" />
</xmp>
</xsl:template>
</xsl:stylesheet>
Adding this template to a webpart will render the XML output based on the current webpart settings.
ContentQueryWebPart
There are situations where the XSLT shown above will not do the trick and here I am thinking about the ContentQueryWebPart. This web part is rendered using several XSLT templates found in the Styles Library in SharePoint. To render the output from the ContentQueryWebPart you need to modify the ItemStyle XSLT. Here is the template I use for this purpose:
<xsl:template name="Xml" match="Row[@Style='Xml']" mode="itemstyle">
<pre style="margin-left:1em">
<xsl:text><</xsl:text>
<xsl:value-of select="local-name(.)"/>
<xsl:apply-templates select="@*"/>
<xsl:text>></xsl:text>
<xsl:apply-templates/>
<xsl:text></</xsl:text>
<xsl:value-of select="local-name(.)"/>
<xsl:text>></xsl:text>
</pre>
</xsl:template>
<xsl:template match="@*">
<xsl:text> </xsl:text>
<xsl:value-of select="local-name(.)"/>
<xsl:text>="</xsl:text>
<xsl:value-of select="."/>
<xsl:text>"</xsl:text>
</xsl:template>
For details on customizing the ContentQueryWebPart and ItemStyle template, you to take a look at this post by Heather Solomon. She does a great job of explaining the details.
Recent Comments