Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Html5 and XHTML are different
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
David Pollak  
View profile  
 More options May 21 2011, 1:27 pm
From: David Pollak <feeder.of.the.be...@gmail.com>
Date: Sat, 21 May 2011 10:27:56 -0700
Local: Sat, May 21 2011 1:27 pm
Subject: Html5 and XHTML are different

Please read this message and the following link before posting any questions
about snippets not properly being invoked:

http://www.assembla.com/wiki/show/liftweb/HtmlProperties_XHTML_and_HTML5

The XHTML parser (the traditional Lift parser) and the Html5 parser are
different.  Specifically:

   - The Html5 parser converts all element labels and attribute names to
   lower case.  This means if you are trying to invoke a snippet named FooBar
   via <lift:FooBar/> it will not work.  Why?  First, the Html5 parser doesn't
   deal with self-closed tags, so <lift:FooBar/> is silently discarded.  So,
   next we try <lift:FooBar></lift:FooBar>.  But the Html5 parser converts it
   to <lift:foobar></lift:foobar> and the FooBar class is not found.  If you're
   using the Html5 parser, please, please, please use the designer friendly
   invocation mechanisms *exclusively*.  This means that <div
   class="lift:FooBar">stuff</div> is the best way to go with the Html5 parser.
   - The Html5 parser converts attribute names to lower case.  This means
   that snippets that are looking for camel-case attribute names will not find
   the attributes.  Yes, this is the same thing I said in the above paragraph,
   but I'm saying it again because this seems to have led to a lot of confusion
   on the Lift list.  So, if you're using the Html5 parser, use designer
   friendly snippet invocation.
   - The XHTML parser is unforgiving about malformed XHTML.  You *must* have
   well formed XML as input if you're using the XHTML parser.  This means all
   tags *must* have a closing tag.  XHTML and some JavaScript libraries do not
   work well together as the XHTML spec does not allow the write() method in
   JavaScript and browsers enforce this.  If you're using Google Maps or some
   other JavaScript libraries, it's best not to use XHTML.

So, please read this *before* posting about snippet invocation errors,
JavaScript errors (especially in Google supplied JavaScript libraries), or
attributes not getting picked up in snippets.  Yes, a lot of old example
code does not work well with the Html5 templates.  We've done our best to
make the transition to Html5 and Designer Friendly as easy as possible, but
sometimes the differences, well, make a difference.

Thanks,

David

--
Lift, the simply functional web framework http://liftweb.net
Simply Lift http://simply.liftweb.net
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »