On Thu, Feb 25, 2010 at 10:12 AM, Cliff Zhao <[email protected]> wrote:
> David, > I have done some investigation and found: > 1. The problem does not appear if I use lift:surround > 2. It will appear if I do not use lift:surround, namely I do not use any > template. > > My guess is: > 1. using lift:surround, the html tag, which has the xmlns and xmlns:lift > attribute, is in the template file; and my main file's root tag is > lift:surround and no namespace info. In this case, the xml node sequence > passed to bind method does not have any namespace information, therefore the > namespaces are not rendered. This is what I expected. > 2. when not using template, the html tag with the xmlns and xmlns:lift > attribute is the root tag of my main file, and the xml node sequence passed > to bind method have the namespace information, therefore, the bind method > does not try to detect the rendering context and does nothing to the node > sequence and the namespaces get rendered. > > I think that the bind method should suppress xmlns attributes. > > Any thoughts? > I think it's a deeper issue with the Scala XML libraries. ;-) With a repro case and a ticket, I can fix it. > > Thank you very much. > > Best Regards, > Cliff Zhao > > > On Thu, Feb 25, 2010 at 11:54 AM, David Pollak < > [email protected]> wrote: > >> I am unable to reproduce this behavior. Can you post an example of your >> code to a GitHub project and open a ticket at >> https://liftweb.assembla.com/spaces/liftweb/tickets and I'll look into >> it. >> >> >> On Thu, Feb 25, 2010 at 7:53 AM, Cliff Zhao <[email protected]> wrote: >> >>> I just refreshed my environment. I am using Lift 2.0 snapshot dated >>> 20100224204407. >>> >>> Cliff >>> >>> >>> On Wed, Feb 24, 2010 at 10:41 PM, David Pollak < >>> [email protected]> wrote: >>> >>>> >>>> >>>> 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]<liftweb%[email protected]> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/liftweb?hl=en. >>>> >>> >>> -- >>> 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]<liftweb%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/liftweb?hl=en. >> > > -- > 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.
