[Ur] Ur/Web and document validation

David LaPalomento dlapalomento at gmail.com
Tue Sep 20 19:17:31 EDT 2011


Hi all,
I've been looking at statically typed, functional web programming
tools and came across Ur/Web. One feature which struck me as
particularly interesting was Ur's ability to ensure the generated HTML
was always valid. I was curious, though, what criteria were being used
to classify HTML as valid. For instance, with XHTML 1.0 Strict anchor
elements can be embedded inside one another as long as there is an
intermediate element in the ancestor chain:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>title</title></head>
<body>
<div><a href="/outer"><span><a href="/inner">hi</a></span></a></div>
</body>
</html>

Browsers will interpret the above differently depending on how their
parsing engine works. Of course, this particular problem is more of a
issue with DTDs-as-validators but I'm curious if/how Ur attempts to
address this sort of wrinkle in the specification(s). Can anyone
enlighten me?

David



More information about the Ur mailing list