Tuesday, October 20, 2009

Using XSL to add a Link to a DataView Webpart populating from XML Web Services

A big problem was trying to display a list from another domain. Dataview Webpart saved me there and my next task was to make the title field link to the document. Since there is no document link readily available, youll have to create it yourself.

First youll need a xsl variable:


<xsl:variable name="webAddy" select="concat('[site]',
substring-before(substring-after(@ows_FileRef,'#'),'Tasks/'),
'Tasks/DispForm.aspx?ID=',@ows_ID)" /> 
 

Pretty simple and straight forward. If your field names don't match, change them accordingly. Next you'll include this:

<a href="{$webAddy}">xsl:value-of select="@ows_LinkTitle"
 /></a>



That just links up the field title to the file name. That's pretty much it. Since you can't use XSL functions within an HTML element, youll have to do both steps to get your link working correctly.

Thursday, February 22, 2007

Special alert: Microsoft Daylight Savings Bug!

So apparently Microsoft has released a patch for a bug in their software that may cause certain time functions to screw up when Spring '07 daylight savings is in effect.

Here is an excerpt from an email I received today:

In 2005, the United States government passed the Energy Policy Act of 2005. This act changes the start and end dates for Daylight Saving Time (DST) as of spring 2007. These changes may impact the way applications run. Microsoft is releasing an update for Windows through Microsoft Update that reflects these changes [...] Developers who use the .NET Framework may find their applications affected if the application uses the time zone information for historical purposes [...] In addition, developers who use Visual C++ may find their applications affected if they use the CRT time functions, or the TZ environment variable.

I love how is starts off by throwing the government under the bus. If this was passed in 2005, why are they releasing a last minute patch 2 years later? Apparently, they must have spent all their time cutting features out of Vista.

A patch for this is avaiable here: http://support.microsoft.com/kb/931836/ and more information can be found here: http://msdn2.microsoft.com/en-us/vstudio/bb264729.aspx