Software development & .NET RSS 2.0
 Thursday, August 26, 2004

I tend to use code-generation to avoid "dumb" work where possible. Xslt is a valueable tool to create the templates for the code that is to be generated. The available functions in Xpath have been limited in number; with the advent of C# the following becomes possible:

<?xml version="1.0" encoding="UTF-8" ?> 
<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:user="http://pareto.nl/PAS">
  <msxsl:script language="CSharp" implements-prefix="user">
     <![CDATA[
 public string CamelCase(string value)
 {
  return value[0].ToString().ToLower() + value.Substring(1);
 }
 
 public string UpperCase(string value)
 {
  return value.ToUpper();
  
 }

Although it'll probably be some time before we can use this within an application as client-side script, it sure does make the Xsl/Xpath-combination a more powerful solution for generating code.

Thursday, August 26, 2004 9:59:54 PM (W. Europe Daylight Time, UTC+02:00)  #    Comments [0] -
Tools
Tracked by:
"Direct TV DirecTV" (DirecTV Direct TV) [Trackback]
"Cialis" (Cialis) [Trackback]
"Car Loans Auto Loans for Bad Credit" (Bad Credit Car Loans) [Trackback]
"Fast Cash Loans" (Fast Cash Loans) [Trackback]
Archive
<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2012
Alex Keizer
Sign In
Statistics
Total Posts: 86
This Year: 0
This Month: 0
This Week: 0
Comments: 71
Themes
Pick a theme:
All Content © 2012, Alex Keizer
DasBlog theme 'Business' created by Christoph De Baene (delarou)