David Carlisle and Jeni Tennison are blogging. Skies are falling. Enough said. Subscribed.
...
I installed Microsoft Visual Studio Codename Orcas Beta1 and was really pleased to see that it's finally capable of targeting not only .NET 3.5. It supports .NET versions 2.0, 3.0 and 3.5. This is going to be the first multitargeted Visual Studio version, so far I had to keep Visual Studio .NET for maintaining .NET
...
I mean pre-XProc XSLT pipeline - just when you need to transform an XML document by a sequence of XSLT stylesheets - output from the first transformation goes as input to the second one and so on. This is useful technique helping dramatically simplify your complex multi-stage XSLT stylesheets. Unfortunately there is no
...
So far to let Google know about your sitemap you had to submit it through Google Webmaster tools. Now, according to the Official Google Webmaster Central Blog you can just reference it in your robots.txt file: Specifying the Sitemap location in your robots.txt file You can specify the location of
...
As you know W3C woke up recently and restarted HTML activity. WHAT Working Group, who was working independently on HTML5 since 2004 now proposes W3C to adopt HTML5 as starting point and to put their Google guy to be in charge of new W3C HTML 5. By the way, the need to annotate
...
Amazon has launched Context Links Beta program. The idea is that you insert a little Amazon script into your pages and when the page is open in a browser the script identifies words and phrases it thinks are relevant and makes them links to whatever Amazon products. I enabled the script
...
So here is nXSLTC.exe v1.0b - an experimental XSLT compiler for .NET 3.5 (Visual Studio "Orcas"). Get it here (free open-source). I probably shouldn't be building this tool, but I have my reasons. Why not? As a matter of fact, Mike Champion has announced back in February that Microsoft
...
The usage is obvious:
nxsltc <source files> [options]
where possible options include:
/out:<file> Specifies the output file name.
/debug[+|-] Emit debugging information.
/nowarn Disable all warnings.
/namespace:<string> Specifies namespace for compiled stylesheets.
/help Display this usage message. (Short form: /?)
/nologo Do not display compiler copyright banner.
Here is a little sample. Consider this dummy XSLT stylesheet (catalog2html.xslt):
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="catalog">
<table>
<xsl:apply-templates/>
</table>
</xsl:template>
<xsl:template match="book">
<tr>
<td>
<xsl:value-of select="title" />
</td>
<td>
<xsl:value-of select="price" />
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
Let's compile it:
nxsltc.exe catalog2html.xslt /namespace:Foo.Bar /out:stylesheets.dll /debug+
The compilation result is stylesheets.dll, which contains our compiled stylesheet as Foo.Bar.catalog2html class:
How do you run such compiled stylesheet? Easy. XslCompiledTransform class has new overloaded Load() method in .NET 3.5, which accepts Type:
XPathDocument doc = new XPathDocument("books.xml");
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load(typeof(Foo.Bar.catalog2html));
xslt.Transform(doc, null, Console.Out);
Above obviously assumes you have added a reference to the stylesheets.dll into your project. Alternatively you can load dll with compiled stylesheets dynamically using Assembly.Load().
I didn't tested performance yet, but it feels like a rocket, very fast. More to come. Get nXSLTC.exe v1.0b here. Enjoy!
PS. And sorry to Microsoft XML Team for spoiling their XSLTC.exe ;)