My first week back at work and there has been so much demand that I've not been able to publish any of my recent experiments. Going back to work was such a shock that I'm taking the next off ;-)
One thing that I did want to share came about from a problem I was trying to solve with the DVWP. I was doing a CrossList query over all sites in the site collection (if you didn't know you can do this, see this blog post) and want to return list items that met a specific criteria but rather than provide a link to the item, I wanted to link to the site containing the item. I have wanted to do the same with the Content Query and Related Documents web parts but they don't support this.
In my case it was a list that exists in every site template containing key project details. The FileRef for the returned items looks like this 1;#projects/project3/lists/Project Details/1_.000
So I could use <xsl:variable name="ProjectURLtemp" select="substring-after(@FileRef, '#')"></xsl:variable>
to drop the 1;# and do a substring-before' /lists' to remove the unwanted remainder.
I also found this http://xsltsl.sourceforge.net/string.html#template.str:substring-before-last and a bunch of other useful functions you can download and use in your Data View/Form xsl.
e.g.
<xsl:variable name="ProjectURL">
<xsl:call-template name="str:substring-before-last">
<xsl:with-param name="text" select="$ProjectURLtemp"/>
<xsl:with-param name="chars">/Lists</xsl:with-param>
</xsl:call-template>
</xsl:variable>
<a href="{$ProjectURL}"><xsl:value-of select="@Title" /></a>
Each sub site in this example has a Data View of the list being queried on the home page which also supports an edit mode. The reason I did this is that the list should only have 1 entry and if users went to the normal list view they might be tempted to create additional rows.
I'll include a screen shot of the rollup result and also describe how the document templates web part works. Every sub site displays the document templates, 30 in this case was too many to use content types, which are held in the top level site but when you click on one of then it behaves the same as a content type and knows to save the document into the current sites document library.