I just discovered HAML, and love its succinctness and readability. Is there any kind of equivalent for XSLT? In particular, I would love something that makes it easier to distinguish between the angle-bracket-containing output and the angle-bracket-containing markup itself.
If there is not a specialised XSLT abstraction language, is there at least a generic form for XML which would also work?
EDIT For fun, I just did a quick test of using actual Haml (actually HamlPy) to generate XSLT. Shortcomings I observed:
- hyphenated element names aren't supported (in HamlPy at least)
%xsl:foo
is not succinct enough. A special character for the XLS namespace, like#foo
would be better.- HTML-specific rules get in the way (in my case, the special self-closing tag rules for
<meta>
are a problem) %xsl:attribute(name="foo" value="blah")
is still way too verbose. something like.foo="blah"
would be better.- certain attributes like
select
are very common, and could be made implicit: #value-of "./a[@href]" - features like
-
and=
for processing logic aren't needed, so could be repurposed for something like xquery or xpath. Or maybe{foo}
could be a shorthand for<xsl:value-of select="foo"/>
. That'd be cool:%p(style={../[@style]})