special treatment of xmlns:lift

57 views
Skip to first unread message

Vasya Novikov

unread,
Oct 14, 2012, 5:50:20 AM10/14/12
to lif...@googlegroups.com
Is it a good idea to add a special treatment of  xmlns:lift attribute in <html> tag?

Reason for the question:

if I _use_ this attribute in templates, then it goes inserted into the rendered HTML.
For example, while using this template:

<html xmlns:lift="http://liftweb.net/">

.... <div id="main_content"> ... </div> ...

</html>

one would get

<div id="main_content" xmlns:lift="">...</div>


If I do _not_ use this template, then my IDE shows warnings about unknown HTML tag. Well, I know that it is considered as correct. But the ability to add xmlns:lift won't make it bad also.


Unformally, we know that almost all tags in Lift are not special and are handled generally.
But, <lift> isn't ! We _have_ <lift> tags. So, it seems logical to me to treat <html xmlns:lift> in a special way, too.

Any thoughts about this?

Rogach

unread,
Oct 14, 2012, 2:33:46 PM10/14/12
to lif...@googlegroups.com
I got an idea - maybe you could make use of LiftRules.responseTransformers?

You can pass a function into it, that would match for need response type and transform the xml inside it - chopping out that "xmlns:lift" attribute.

David Pollak

unread,
Oct 14, 2012, 8:51:16 PM10/14/12
to lif...@googlegroups.com
In general, Html5 is preferred to XHTML, and you can use data-lift or class="lift:xxx" for snippet invocations even if you are using XHTML.  No need for <lift:xxx>


--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
 
 
 



--
Telegram, Simply Beautiful CMS https://telegr.am
Lift, the simply functional web framework http://liftweb.net


Reply all
Reply to author
Forward
0 new messages