On Wed, Feb 24, 2010 at 2:35 PM, Cliff Zhao <[email protected]> wrote:
> One of my project requirements is to be complaint with XHTML Strict 1.0. > > I have set the Lift to use XHTML Strict 1.0 and the Lift generates the > page: > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " > http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns:lift="http://liftweb.net/" xmlns="http://www.w3.org/1999/xhtml > "> > <head> > <title>Cliff's Test</title> > </head> > <body> > <p> > Hello world! > </p> > <form action="/survey/" method="post"> > <p xmlns:lift="http://liftweb.net/" xmlns="http://www.w3.org/1999/xhtml"> > <input name="F63599703223BC2" type="submit" value="New" /> > <label for="comments">Comments</label><br /> > <textarea rows="10" name="F63599693222EH4" cols="40" > id="comments">ABC</textarea> > <input name="F63599703223BC2" type="submit" value="New" /> > </p> > </form> > <script type="text/javascript" > src="/survey/ajax_request/liftAjax.js"></script> > <script type="text/javascript"> > // <![CDATA[ > jQuery(document).ready(function() {liftAjax.lift_successRegisterGC();}); > var lift_page = "F63599693221SZP"; > // ]]> > </script></body> > </html> > It seems to be OK, but when I put them into W3C validator, it points out 1 > error: > > [image: Error] *Line 13, Column 43*: Attribute "xmlns" is not a valid > attribute. Did you mean "onmouseup" or "onmouseover"? > > <p xmlns:lift="http://liftweb.net/" xmlns=*"*http://www.w3.org/1999/xhtml"> > > ✉ <http://validator.w3.org/feedback.html?uri=;errmsg_id=108#errormsg> > > You have used the attribute named above in your document, but the document > type you are using does not support that attribute for this element. This > error is often caused by incorrect use of the "Strict" document type with a > document that uses frames (e.g. you must use the "Transitional" document > type to get the "target" attribute), or by using vendor proprietary > extensions such as "marginheight" (this is usually fixed by using CSS to > achieve the desired effect instead). > > This error may also result if the element itself is not supported in the > document type you are using, as an undefined element will have no supported > attributes; in this case, see the element-undefined error message for > further information. > > How to fix: check the spelling and case of the element and attribute, > (Remember XHTML is all lower-case) and/or check that they are both allowed > in the chosen document type, and/or use CSS instead of this attribute. If > you received this error when using the <embed> element to incorporate flash > media in a Web page, see the FAQ item on valid > flash<http://validator.w3.org/docs/help.html#faq-flash> > . > > > My original code is: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " > http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:lift="http://liftweb.net/ > "> > <head> > <title>Cliff's Test</title> > </head> > <body> > <p>Hello world!</p> > <lift:main.list form="POST"> > <p> > <act:new/> > <label for="comments">Comments</label> > <br /> > <act:comment/> > <act:new/> > </p> > </lift:main.list> > </body> > </html> > > > Could anybody explain why one of the p tag added with namespace attributes? > What version of Lift are you using? > > Thank you very much. > > Best Regards, > Cliff Zhao > > > > > > > > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<liftweb%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
