try pastebin.com or gist.github.com as they do syntax highlighting and saves people having the whole xml blob in an email, also line numbers can be commented upon correctly as it might be different depending what your viewing it in. On 6 March 2014 13:04, Fredrik Andersson wrote: > Yes you are right!I guess this is beacause I use online outlook!I will try > to post it again, written in curier new in textpad or something first!Sorry > again! > > > From: lukaszlenart@apache.org > > Date: Thu, 6 Mar 2014 14:02:56 +0100 > > Subject: Re: Why do I get this XHTML validation errors? > > To: user@struts.apache.org > > > > Unreadable :\ > > > > 2014-03-06 13:35 GMT+01:00 Fredrik Andersson : > > > Hello guys! > > > I trying to produce a app that renders in XHTML. "-//W3C//DTD XHTML 1.0 Transitional//EN" " > http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> > > > How ever I got a form looking like this: > > > name="productComment.emailAddress" label="Email address" > labelposition="top" maxlength="128" size="40" /> name="productComment.subject" label="Subject" labelposition="top" > maxlength="128" size="40" /> label="Message (max 1024 chars)" cols="52" rows="5" labelposition="top" > wrap="hard"/> name="PRODUCTCOMMENTSACTION_FORM_TOKEN_NAME" value="%{formToken}" /> > > > > This gets rendered like:25
name="productcommentssave" action="/productcommentssave.action" > method="post">26 27 28 29 30 31 name="productComment.emailAddress" size="40" maxlength="128" value="" > id="productcommentssave_productComment_emailAddress"/>33 343536 > 37 38 39 40 type="text" name="productComment.subject" size="40" maxlength="128" > value="" id="productcommentssave_productComment_subject"/>42 > 434445 46 47 48 49 51 525354 > 55 57585960 > value="1394108222515" > id="productcommentssave_PRODUCTCOMMENTSACTION_FORM_TOKEN_NAME"/>61 type="hidden" name="productid" value="3" > id="productcommentssave_productid"/>62
valign="top" colspan="2">
id="productcommentssave_0" value="Submit"/>56
> > > From http://validator.w3.org/#validate_by_input+with_options I > validate it and get these 3 anoying errors: > > > Line 50, Column 63: there is no attribute "wrap"…Comment.text" > cols="52" rows="5" wrap="hard" id="productcommentssave_productCo…✉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 > element to incorporate flash media in a Web page, see the FAQ item > on valid flash. Line 60, Column 161: document type does not allow element > "input" here…1394108222515" > id="productcommentssave_PRODUCTCOMMENTSACTION_FORM_TOKEN_NAME"/>✉The > element named above was found in a context where it is not allowed. This > could mean that you have incorrectly nested elements -- such as a "style" > element in the "body" section instead of inside "head" -- or two elements > that overlap (which is not allowed).One common cause for this error is the > use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly > closed elements, this error can create cascading effects. For instance, > using XHTML's "self-closing" tags for "meta" and "link" in the "head" > section of a HTML document may cause the parser to infer the end of the > "head" section and the beginning of the "body" section (where "link" and > "meta" are not allowed; hence the reported error). Line 61, Column 93: > document type does not allow element "input" here…t type="hidden" > name="productid" value="3" id="productcommentssave_productid"/>✉The element > named above was found in a context where it is not allowed. This could mean > that you have incorrectly nested elements -- such as a "style" element in > the "body" section instead of inside "head" -- or two elements that overlap > (which is not allowed).One common cause for this error is the use of XHTML > syntax in HTML documents. Due to HTML's rules of implicitly closed > elements, this error can create cascading effects. For instance, using > XHTML's "self-closing" tags for "meta" and "link" in the "head" section of > a HTML document may cause the parser to infer the end of the "head" section > and the beginning of the "body" section (where "link" and "meta" are not > allowed; hence the reported error). > > > Do you guys see anything that I could do to correct this? I would love > to have a app with correct xhtml. > > > Best regardsFredrik > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > > For additional commands, e-mail: user-help@struts.apache.org > > > >