|
Member
|
sciamannikoo
-
1/24/2006 12:30:56 PM
XHTML 1.0 Strict compliance
Please, see this url: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.tamtando.com
w3c show me 3 errors dues to framework rendering.
I've tried to make all possible to build XHTML 1.0 Strict pages, because I need maximum cross-browsing and cross-systems, but I cant manage errors showed by w3c validator.
How I can solve this problem?
thanks!
|
|
|
Member
|
sciamannikoo
-
1/24/2006 11:31:26 PM
Re: XHTML 1.0 Strict compliance
Oops... I've forget to set CMSFixXHTML key in web.config and appropriated DOCTYPE :-(
Sorry
|
|
|
Guest
|
admin
-
1/25/2006 7:25:47 AM
Re: XHTML 1.0 Strict compliance
Hi Andrea,
congratulations to creating a XHTML-compliant web site! I know it's not a trivial task, especially in VS 2003 editor...
Regards,
|
|
|
Member
|
sciamannikoo
-
1/25/2006 8:51:42 AM
Re: XHTML 1.0 Strict compliance
Thank you very much!
well, honestly my final solution is a compromise of several things.
1. I've changed DOCTYPE to XHTML 1.0 Transitional not Strict. 2. I've tried to write a well formed XHTML, but effectively VS 2003 and Framework 1.1 add some not wellformed tags 3. I've used Kentico feature to solve problem in item 2
Now I've more one problem I want to solve. In some pages, in effect, I've some errors from W3C validator, caused from some attributew wich contains unallowed characters (eg.: [!] and ['] in http://validator.w3.org/check?uri=http%3A%2F%2Fwww.tamtando.com%2FGruppo%2FDiscografia%2FVCBL.aspx). These characters are generally in "name" attribute of hyperlinks, or "alternatetext" of images tags and are retrieved from documents attributes. I've tried to use Server.HTMLEncode method, but some character are unconverted.
Do you know how to resolve that? Is possible to edit the code used from key CMSFixXHTML, to convert (or remove) unallowed characters?
Thank you, Andrea
|
|
|
Guest
|
admin
-
1/26/2006 4:14:49 PM
Re: XHTML 1.0 Strict compliance
Hi Andrea,
The apostroph is generally not a forbidden character, which is why Server.HTMLEncode doesn't encode it. You probably get the error because of the apostrophs used instead of " character (I understand that you need to do that because of VS.NET designer). You will need to replace apostroph and other characters with their appropriate entities, such as ' (for apostroph).
You can find them at http://www.w3schools.com/tags/ref_ascii.asp and http://www.htmlhelp.com/reference/html40/entities/.
Best Regards,
|
|
|
Member
|
sciamannikoo
-
1/26/2006 4:53:09 PM
Re: XHTML 1.0 Strict compliance
Thank you. I know characters entities, but I've not think (I've not analized good erro message) the problem was cause from VS.NET designer. Thank you.
Others validation problems are caused from Image Gallery ascx control:
1. There is a link to a CSS file. This can be solved removing this link or moving to head tags 2. An error about "language" attribute in album/picture dropdownlist. thi can be solved using links instead of dropdownlist. 3. With URL like in <img src='/getfile.aspx?nodeid=277&maxsidesize=150', due alway to ' characters, i think, I obtain errors to like 'cannot generate system identifier for general entity "maxsidesize" ' or more others errors. I dont know ho to resolve this problem.
|
|
|
Member
|
Martin_Kentico
-
1/31/2006 1:46:17 PM
Re: XHTML 1.0 Strict compliance
Hello Andrea,
#1 and #2 are clear, but about the problem #3, I am not sure what kind of information do you need for that, because I have looked at the page gallery and the validation and the links seems to be just fine (except the end of the page, where there is probably is some corrupted marking about cc1:CMSViewer control).
Could you please provide us with some more information about what exactly is that URL problem about and where is it happening?
|
|
|
Member
|
sciamannikoo
-
1/31/2006 2:29:27 PM
Re: XHTML 1.0 Strict compliance
Sorry, I've forget to write I've found a solution. Also, reading my post, I've see a lot of errors in my bad english! :-)
The problem using databing, is dues to apostrophe character, we know that. I've solved rerewriting the control and using ItemDataBound event of repeater control. In ItemTemplate i've inser an HyperLink control, with appropriated ID. In ItemDataBound event, i've made something like that:
Dim ctl as Control = e.Item.FindControl("hlThumbnail") If not ctl is nothing then Dim hlThumbnail As HyperLink = CType(ctl, HyperLink) [... Setting of appropriated properties for text, imageurl, navigateurl, alternate text, etc... ] End If
This solution render, weith only one control, appropriated tags for anchors and images, with " instead of apostrophes.
Well, for my business, I've removed all pagers and Table tags (I dont want use tables, but i think I should use to obtain a good grid view :-( ... I dont know how make a table-like view without using table tags).
|
|
|
Member
|
Martin_Kentico
-
2/2/2006 8:58:53 AM
Re: XHTML 1.0 Strict compliance
Hello,
Never mind, now I understand your point perfectly.
Yes, the content databinding to the regular HTML tags is not really the best to do for the code to ve validated, probably that's why ASP.NET provides its own mirrored controls for that. The way you did it is just fine, we will try to change it the same way (if there is not just regular HTML code by purpose, I need to check that).
About the grid-like look:
I don't think there is an elegant way to avoid the table tags to have a grid like view. Of course, for special cases there is a way how get the same look by using the <div> or <span> elements with CSS, but personally I think the table is much better.
If you meant just that you don't like using the <table> tags within the aspx code, but you don't mind it within the HTML code rendered, I'd prefer <asp:Table>, <asp:DataList> or <asp:DataGrid> for that (depending on what exactly do you need), they deal pretty good with differences between the browsers.
|
|
|