(Final) Update: I’ve uploaded a sample project to demonstrate using the StripWhitespace method in an XSL transformation. The project is provided as a zip file and contains a sample input message – download the sample project here.
Update: The stylesheet I’m using on modhul.com appears to be shrinking the images in this post on Firefox (IE appears to be unaffected) – simply right-click the image to view the correct size.
Its faily simple to use – the following inline C# method strips whitespace from the input:
Before the inline code will work, you’ll need to inform the XSLT processor about the msxsl and user prefix (user can be anything you want):
Finally, you’ll need to call the inline method from the actual XSLT template:
$InputField here is just an example, you can use any valid input to the value-of element.