Project Description
CityLizard Framework allows developers to design strongly typed XML and HTML using .NET languages, such as C#, VB, F#, Nemerle. The project inspired by LINQ to XSD and Sharp DOM.
Example
XHTML:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Title of the page</title>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type" />
<link href="css/style.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/JavaScript/jquery-1.4.2.min.js"></script>
</head>
<body>
<div>
<h1>Test Form to Test</h1>
<form action="post" id="Form1">
<div>
<label>Parameter</label>
<input type="text" value="Enter value" />
<input type="submit" value="Submit!" />
</div>
</form>
<div>
<p>Textual description of the footer</p>
<a href="http://google.com/"><span>You can find us here</span></a>
<div>Another nested container</div>
</div>
</div>
</body>
</html>
C#:
html
[head
[title["Title of the page"]]
[meta_(
content: "text/html;charset=UTF-8",
http_equiv: "Content-Type")
]
[link_(href: "css/style.css", rel: "stylesheet", type: "text/css")]
[script_(type: "text/javascript", src: "/JavaScript/jquery-1.4.2.min.js")]
]
[body
[div
[h1["Test Form to Test"]]
[form_(action: "post", id: "Form1")
[div
[label["Parameter"]]
[input_(type: "text", value: "Enter value")]
[input_(type: "submit", value: "Submit!")]
]
]
[div
[p["Textual description of the footer"]]
[a_(href: "http://google.com/")
[span["You can find us here"]]
]
[div["Another nested container"]]
]
]
];
Features
- HTML verification at compile-time.
- Proper generation of all empty elements such as input, img, br, hr.