>>3
I agree with the use of sexp in more situations.
Name:
Anonymous2010-10-24 7:14
What compiler/front end are you using that accepts <multiply> and <subtract> tags? Mine only takes <funccall> (equivalent to <apply>). I'd write it like this:
<define name="f">
<lambda args="x">
<apply func="*">
<variable name="x" />
<apply func="f">
<apply func="-">
<variable name="x" />
<int value="1" />
</apply>
</apply>
</apply>
</lambda>
</define>If the function the value of a sub-expression, leave out the func="..." part and the first sub expression is used as the function instead.
Name:
Anonymous2010-10-24 7:17
>>13
With SGML all those </apply> closing tags could be changed to just </>.
Name:
Anonymous2010-10-24 8:33
>>11
(tag '((:attribute "value") (:this "that"))
(tag2 '((:another "attribute"))
"I'm the content of tag2."))
could be the equivalent to
<tag attribute="value" this="that">
<tag2 another="attribute">
I'm the content of tag2.
</tag2>
</tag>
>>11
The way you do attributes in SXML is with '@' i.e. (a (@ (href "www.google.com")) "Google")), since it is not a valid name in XML. In R6RS '@' is no longer allowed because it is ambiguous, so the wak libraries changed this to '^'.