I'm trying to implement factorial in an xml language
I'm trying to implement factoria开发者_开发知识库l in the xml language of xcerion.
<step id="fac"> <alias name="p" value="={$n}*{$p}" /> <alias name="n" value="={$n}-1" /> <operation name="decision"> <when test="'{$n}'>'0'" step="fac" /> </operation> </step> <alias name="p" value="1" /> <alias name="n" value="4" /> <operation name="call" value="fac" />
My code works, but I think it's a bit wordy.
How does this language compare with other xml languages?
Especially handling of variables, selection, loops and subroutine calling.
精彩评论