Search This Blog

11 October 2010

Listing changed objects in a rollup

Once a rollup archive has been decompressed, a manifest file is accessible in the root-directory of the extracted files. In the RU5 for the SP1 (KB982812) this file is called “dynamicsax2009-kb982812-sp1-manifest.xml”. So far so good. Unfortunately this manifest file can be very large and is over 1GB for the RU. This because the file contains not only the changes, but also all dependencies, with makes this file so verbose.
The TransformTool is very simple tool and might help you working with these data by transforming the original manifest data into a much less verbose xml-file:



image
Screenshot of the tool
The transformed xml-data do not contain the dependencies and can now be opened in Excel. The Xslt-file that is used for the transformation is:

<xsl:stylesheet version="2.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:xs="http://www.w3.org/2001/XMLSchema" 
xmlns:fn="http://www.w3.org/2005/xpath-functions" 
exclude-result-prefixes="xs fn xsl">
<xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes"/>
<xsl:template match="/">
<changes>
<xsl:for-each select="//manifest">
<xsl:for-each select="hotfix" >
<xsl:variable name='kb' select="./@id"/>
<xsl:for-each select="changes">
<xsl:for-each select="layer" >
<xsl:variable name='layerId' select="./@id"/>
<xsl:for-each select="change">
<change>   
<xsl:attribute name="kb">
<xsl:value-of select="$kb"/>
</xsl:attribute>
<xsl:attribute name="layer">
<xsl:value-of select="$layerId"/>
</xsl:attribute>
<xsl:attribute name="object">
<xsl:value-of select="./@object"/>
</xsl:attribute>
<xsl:if test="./@method">
<xsl:attribute name="method">
<xsl:value-of select="./@method"/>
</xsl:attribute>                            
</xsl:if>
</change>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
</xsl:for-each>
</changes>
</xsl:template>
</xsl:stylesheet>
 
image
The generated Xml-file


Opening this Xml-file in Excel will look like this:

image
The Xml data imported in Excel
 

which makes it now possible to filter, sort…

Hope this might help ;-)

PS (01/10/2010):
Excel needs the meta-tag:

to display the Xml-data correctly formatted. If you need the Xml in a formatted, easy to read format, open the Xml in Visual Studio, select the whole content (Ctrl+A) and format the Xml (Ctrl+K+F). Just keep the Ctrl button pressed and press first "K" and then "F".

No comments:

Post a Comment