The Artima Developer Community
Sponsored Link

Java Buzz Forum
Staying valid

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Steve Conover

Posts: 37
Nickname: sgcjr
Registered: Feb, 2003

Steve Conover is a professional Java engineer and consultant
Staying valid Posted: Dec 13, 2005 3:18 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Steve Conover.
Original Post: Staying valid
Feed Title: Steve Conover's Weblog
Feed URL: http://www.sonic.net/~conover/index.rdf
Feed Description: Mostly java-related.
Latest Java Buzz Posts
Latest Java Buzz Posts by Steve Conover
Latest Posts From Steve Conover's Weblog

Advertisement

Andrei Herasimchuk:

There seems no automatic way to keep a site valid with web standards unless you close it off to the rest of the world to contribute to it. I will not do that anytime soon.

There is: I'm doing it. Next Thursday will mark the one year anniversary of my switching to application/xhtml+xml as the content-type header for this site, for user agents that support it. Using that content-type forces Gecko engine browsers to refuse to render pages if they are not well-formed XML, so if a page is invalid I hear about it pretty quickly.

So how do you keep a frequently updated site with data from external sources and user comments valid? There are really only two things you need to do. Firstly, ensure that everything going IN to the system (entries and comments) is valid XHTML. I do that using a simple validation system for comments and a bookmarklet for my own entries. Secondly, any and all data from external sources (my blogroll from blo.gs, blogmark URLs added using a bookmarklet) needs to be entity-escaped before being displayed on the site. In my case, a call to PHP's htmlspecialchars() function is all that's needed.

I'm not saying my system is ideal - the need for well formed markup in comments is a major usability issue even on a site with an audience consisting mostly of web developers. But it's certainly possible to operate a site in XHTML with frequent updates and user comments while staying valid at the same time.

Read: Staying valid

Topic: God forbid you have extra space at the end of your PHP file! Previous Topic   Next Topic Topic: Today IT has changed for ever

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use