web 2.0

NCover xsl for Cruisecontrol webdashboard

I've started using NCover to monitor the test coverage on a CruiseControl.net project. Disappointed with the included version of the ncover report I quickly through together a new version of the NCover.xsl to be used by CruiseControl.net. Simply download the file and copy it to: cruisecontrol.net/webdashboard/xsl/

It's based on the original ncover.xsl but inspired by the version from Yves Lorphelin's code coverage tool NCover

Tags: ,

Reply to Rob

Rob regarding your comment in this post:

I've uploaded this DualDocParserSample.zip file for your perusal.

It's all self contained and is just a little contrived. Nevertheless the principal is there. It's just that often I have XmlDocuments coming from loads of places and rather than merge them into one document it would be nice to pass in the various nodes as parameters to the transform sheet. Another example would be to pass in a look up file to use to decode some information.

The other useful information I found with this was the document() function, and the xsl:include element, both of which deserve a bit more use. 

Tags:

An update to yesterday's post

A follow up to yesterday's post about parsing 2 documents in the one stylesheet it is possible to do this.

I was very close to solving the problem but was sending the wrong object through. A look at the documentation (oops) reveals that I needed to pass a XPathNodeIterator.

Once I'd done this then everything worked fine. If anyone wants some example code let me know.

Tags:

How to add a DOM Document as a parameter to an XslTransform?

I've been puzzling over this and I'm sure I've seen it done somewhere. Surely it must be possible to pass a document as a parameter to an xsl transform.

I've created the xslt and added the <xsl:param name="doc" /> and added the document via the XsltArgumentList.AddParam() method.

However, when I try to do anything to the $doc param inside the xslt file I get nothing.

<xsl:value-of select="string($doc)" /> returns "System.Xml.DomDocument"

Which makes me think that the AddParam() has performed a ToString() on the object before adding it as a param, but curiously:

<xsl:value-of select="$doc" /> does nothing.

I'm sure I'll get to the bottom of it tomorrow.

Tags: