May 2007 Archives

I found this gem in David Carlisle's blog. Smart Javascript trick allows to mask msxsl:node-set() extension function as exsl:node-set() and so you can easily write crossbrowser XSLT stylesheets using exsl:node-set() functionality. Opera 9, Internet Explorer 6-7 and Firefox 3 are covered, but sadly Firefox 2 is out of the game. Julian Reschke came with a nice trick using Javascript expressiveness:

<xsl:stylesheet
  version="1.0" 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:exslt="http://exslt.org/common"
  xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  exclude-result-prefixes="exslt msxsl">
  

<msxsl:script language="JScript" implements-prefix="exslt">
 this['node-set'] =  function (x) {
  return x;
  }
</msxsl:script>
...

Very smart.

That reminds me old days of mine when I came with a similar trick for EXSLT extension functions implemented in C# (for EXSLT.NET project). Except that C# isn't so dynamic as Javascript so I had to escape to renaming method names in MSIL bytecode. That trick still drives EXSLT.NET (now module of the Mvp.Xml library).

 By the way just to remind you - .NET (XslCompiledTransform) supports exsl:node-set() function natively.

Yes, I'm trying to change the way you work with XSLT in Microsoft Visual Studio. It must be a pleasure to develop and rocket fast at runtime. Yes, Visual Studio already supports editing, running and even debugging XSLT, but it's still a painfully limited support. So I'm started building IronXSLT - Visual Studio plugin aimed to provide total integration of the XSLT language in Visual Studio IDE.

Current list of planned and already implemented IronXSLT features includes:

  1. XSLT Library Project (Visual Studio project type for compiling XSLT into DLL)
  2. XSLT Refactorings
  3. Multiple XSLT engines
  4. XSLT Profiler
  5. Extensive library of XSLT code snippets
  6. XPath Intellisense
  7. Visual XSLT builder
  8. XSLT2XLinq and XLinq2XSLT converters

IronXSLT version 0.1 implements first point.

IronXSLT supports only forthcoming Microsoft Visual Studio version, codenamed "Orcas", which is about to be released later this year. That also makes IronXSLT ship date.

IronXSLT is free for personal and commercial usage, but not open source currently.

Compiled XSLT decompiler?

| 3 Comments | No TrackBacks | , ,

I was reading Scott's post on Reflector Addins and had this idea... Now (well, not now but in the next .NET version - Orcas) that XSLT can be compiled into dll, it must be time to think about XSLT decompiler (and appropriate Reflector addin of course). I believe that must be feasible. Would it be useful for you?

To be continued...

Mark Miller announced Refactor! for ASP.NET v2.2 - free code refactoring tool from Developer Express. It includes 29 refactorings, including 10 ASP.NET related ones and is available for Visual Studio 2005 and Visual Studio Orcas Beta1.

ASP.NET refactorings include:

  1. Add Validator
  2. Extract ContentPlaceHolder
  3. Extract ContentPlaceHolder (and create master page)
  4. Extract Style (Class)
  5. Extract Style (id)
  6. Extract to UserControl
  7. Move Style Attributes to CSS
  8. Move to Code-behind
  9. Rename Style
  10. Surround with Update Panel

This is awesome tool and it saves me LOTS of time (I'm using Refactor! Pro).

My favorites so far:

Those lucky like me having Refactor! Pro - don't install Refactor! for ASP.NET, instead update your Refactor! Pro installation.

 Google has started to migrate AdSense users to Google Accounts and it broke my little  AdSense Watch Toolbar - it couldn't login into account. For the first time and only because I haven't coded login procedure flexible enough. The change was oneliner - just different URL.

Anyway, I uploaded AdSense Watch Toolbar v1.0.1, which supports both old AdSense and new Google Accounts. If you migrated to Google Accounts, please update.

Do you realize that PDF documents can contain embedded Javascript code? Yes, it can. Adobe Acrobat Reader supports Javascript 1.5 extended by Adobe and it allows such sweet things as dynamic PDF content and appearance manipulation, database-driven PDF documents, multimedia, layers, 3D, Flash in PDF (!) etc.

We've seen fancy PDF documents with animations, lame PDF calculators, but where is the real beef? Where is Web2-like stuff, where are AJAXy PDF eBooks?

The platform appears to be strong enough, the Adobe Acrobat Reader market penetration must be huge, so why smart eBooks still nowhere to be seen? I can imagine lots of opportunities:

Autcomplete search field prepopulated with index words? That would improve search in huge documents, which is still a nightmare despite all Adobe efforts

Dynamic context ads in eBooks? Many would hate it, but authors and publishers would appreciate such revenue stream. Say, small text-based context ad on every 5th page wouldn't harm much. After all unlike Web pages eBooks usually have lots the real content so it must be easy to produce really well targeted context ads.

Social features in eBooks? That might be huge. eBook readers form natural social community, which is currently completely hidden. "Recent readers" sidebar, annotations, ratings, comments, chatting, "Digg this book"?

Autoupdating eBooks? "New book edition is published, get it here" or even "Book updates available, download?". Why not?

These are just few the most obvious ideas. Sure you can come up with more.