Heiko
On Thursday, November 25, 2010, David Pollak
<feeder.of...@gmail.com> wrote:
> Folks,
>
> I just checked in code for dpp_issue_714, also known as support for HTML5. Basically, to get HTML5 support:
>
> LiftRules.htmlProperties.default.set((r: Req) => new Html5Properties(r.userAgent))
>
> This changes out the parser from the standard Scala XML parser to the nu.validator.htmlparser parser. It also changes the DocType to <!DOCTYPE html> and the Content-Type to text/html. The internal XML representation is converted to HTML using a new routing as well. The new routine emits "the right thing" for the various classes of tags (including "void" tags).
>
> I've converted the examples/example code to HTML5. The following changes are necessary:
> All tags are converted to lower case. This means the <lift:FooBar/> gets converted to <lift:foobar/> I advise converting to designer friendly where possible (e.g., <div class="lift:FooBar"></div>)
> Tags of the format <div/> and <my_thing:bind/> are not legal. They must be converted to <div></div> and <my_thing:bind></my_thing:bind> Unfortunately, the parser is very forgiving so rather than barking about the lack of closing tag, the parser will nest things in unexpected ways.
> There are some tags that the parser "ensures". For example a <tr> or <tbody> tag *must* be the first tag inside <table>. This breaks the <table><mysnippet:line><tr><td><mysnippet:bind_here></mysnippet:bind_here></td></tr></mysnippet:line><table> paradigm. You can get the desired behavior with
> <table><tr lift:bind="mysnippet:line"><td><mysnippet:bind_here></mysnippet:bind_here></td></tr><table>.As soon as 714 is given a thumbs up, I'll roll it into master. In the mean time, you can check out the Html5 goodness of Lift at http://demo.liftweb.net
>
> Thanks,
>
> David
>
> --
> Lift, the simply functional web framework http://liftweb.net
> Beginning Scala http://www.apress.com/book/view/1430219890
> Follow me: http://twitter.com/dpp
> Blog: http://goodstuff.im
> Surf the harmonics
>
>
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
>
--
Heiko Seeberger
Company: weiglewilczek.com
Blog: heikoseeberger.name
Follow me: twitter.com/hseeberger
OSGi on Scala: scalamodules.org
Lift, the simply functional web framework: liftweb.net
Akka - Simpler Scalability, Fault-Tolerance, Concurrency & Remoting through
Actors: akkasource.org
Peter
--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
David Pollak wrote:
>
>
> On Thu, Nov 25, 2010 at 6:16 AM, Peter Robinett <pe...@bubblefoundry.com
> <mailto:pe...@bubblefoundry.com>> wrote:
>
> On Nov 25, 12:56 am, David Pollak <feeder.of.the.be...@gmail.com
> <mailto:feeder.of.the.be...@gmail.com>>
> wrote:
> > - There are some tags that the parser "ensures". For example
> a <tr> or
> > <tbody> tag *must* be the first tag inside <table>.
>
> Is <thead> supported?
>
>
> I guess so... you can check out more on
> http://about.validator.nu/htmlparser/ This parser is considered the best
> HTML5 parser around by the likes of John Resig.
.. and Mark Pilgrim
[http://diveintohtml5.org/semantics.html#further-reading] :)
>
>
> Peter
>
> --
> You received this message because you are subscribed to the Google
> Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com
> <mailto:lif...@googlegroups.com>.
> To unsubscribe from this group, send email to
> liftweb+u...@googlegroups.com
> <mailto:liftweb%2Bunsu...@googlegroups.com>.