The predicate html/4 implements HTML quasi quotations. These
quotations produce a DOM term that is suitable for html//1 and
other predicates that are declared to consume this format. The
quasi quoter only accepts valid, but possibly partial HTML
documents. The document must begin with a tag. The quoter
replaces attributes or content whose value is a Prolog variable
that appears in the argument list of the html
indicator. If
the variable defines content, it must be the only content. Here
is an example, replacing both a content element and an
attribute. Note that the document is valid HTML.
html({|html(Name, URL)||
<p>Dear <span class="name">Name</span>,
<p>You can <a href="URL">download</a> the requested
article now.
|}