Is it possible to embed Prolog code inside (X)HTML tags, just like in PHP, ASP or JSP? I’ve taken a look at XSB and SWI-Prolog, but didn’t find anything like that.
In ASP, for example, you can do something like this without a problem:
<!DOCTYPE html>
<html>
<body>
<%
response.write("Hello World!")
%>
</body>
</html>
How to combine (X)HTML and Prolog in a similar manner?
Thank you.
Have a look at prospear, it seems to be providing exactly what you want.
In general, few other people have had the same idea, google for “Prolog Server Pages”.