Here's one approach: http://www.swi-prolog.org/pldoc/man?section=pwp
Scroll down for examples. You might disagree, but I think the fit between Prolog semantics and expanding XML templates is surprisingly natural.
Here's one approach: http://www.swi-prolog.org/pldoc/man?section=pwp
Scroll down for examples. You might disagree, but I think the fit between Prolog semantics and expanding XML templates is surprisingly natural.