Re: html quasiquoter

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 07/21/2013 04:47 PM, Anne Ogborn wrote:
> This morning got a rude suprise - the html quasiquoter doesn't produce what html//1 expects.
> 
> I did 
> 
> menubar(fixed_width, PageLocation) -->
> html(\
>     {|html(PageLocation)||
>     <div id='menubar'>
>         <div class='menubar fixed-width'>
>             <ul class='menubar-container'>
>                 <li><a href="/">HOME</a></li>
>                 <li>DOWNLOAD... much more HTML ...
>    |}).
> 
> and got (Oops!):

There is nothing wrong.  html//1 accepts the output of the HTML parser
just as well as
the Element(Attrs,Content) syntax.

Do I miss something?  Oh, I now see a "\" before the quasi quotation.
That is not the
idea.  It isn't something you call.

	Cheers --- Jan

> 
> plweb_page:menubar(fixed_width, _, A, B) :-
> html(\[element(div, [id=menubar], ['        ', element(div, [class='menubar fixed-width'], ['            ', element(ul, [...], [...|...]), '\n        ']), '\n    '])],
>      A,
>      B).
> 
> 
> Guess we need to have a dom quasiquoter or some as_dom   (which will be inelegant)?
> _______________________________________________
> SWI-Prolog mailing list
> [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.