Jump to content

(x)html validation of php-generated page


yoshida

Recommended Posts

EDIT: <a href="index.php?pageid=showobj&obj=somepage">click me</a> does the trick. Validation of the homepage is almost complete./EDITHi.I'm currently re-writing my website to comply with w3c xhtml standards. The page is generated by a php script, and the html data is stored in a mysql database. (which makes it possible for me to use a cms, so I can change elements of the site within seconds)I'm not experiencing any problems changing my tags and attributes. It won't even be more than 30 minutes before I changed my css (divs to classes). But changing my script would be harder.The reason I'm posting this in the xhtml forum, is because the validator doesn't like it when I propagate variables.

<a href="index.php?pageid=showobj&obj=somepage">click me</a>

It produces warnings like

# Warning Line 214 column 53: reference not terminated by REFC delimiter.<div id=deflink><a href="index.php?pageid=showobj&obj=aboutus">About us</a></div># Warning Line 214 column 53: reference to external entity in attribute value.<div id=deflink><a href="index.php?pageid=showobj&obj=aboutus">About us</a></div># Error Line 214 column 53: reference to entity "obj" for which no system identifier could be generated.<div id=deflink><a href="index.php?pageid=showobj&obj=aboutus">About us</a></div># Info Line 205 column 37: entity was defined here.<td><a href="index.php?pageid=showobj&obj=about">ABOUT</a></td>
Is it possible to change this type of link into valid xhtml without changing my script? Help would be greatly appreciated.
Link to comment
Share on other sites

You mean if there's a way to add "amp;" without adding "amp;"? No.[edit]Oh wait, sorry. I didn't saw that first line was an edit. Please, in the future, place edits in the end. It makes more sence.[/edit]

Link to comment
Share on other sites

But it also saves people like you from reading the entire post (and put some thinking into it) before reading the problem has been solved.Sorry pall, can't put it like an edit more than I already did. :) Happy holidays.

Link to comment
Share on other sites

My site is bugging me.Right now I'm trying to get it validated, but my script uses a meta to auto-forward to another part of the site.

<div class="notify">Action completed. You'll be forwarded within five seconds.</div><meta http-equiv="Refresh" content="4; url=index.php?pageid=home">

This creates the next warning:

document type does not allow element "meta" here
This is the very last thing I'm unable to tackle (with converting my site to xhtml). Does anyone know how to tackle this? A php solution would be great, if possible no javascript please.
Link to comment
Share on other sites

That would work, except my script has multiple autoforward tags for each submitted form. All form handlers are past the part that generates the <head></head> section. What I need is an alternative, and not a workaround.

Link to comment
Share on other sites

Thanks for the trouble.Both solutions have issues tho; the php solution should be before the html tag, which is even a bigger problem than 'should be in the head', and the .htaccess gives no opportunity for a time-out.I've been googling all day, and I'm pretty much about to forfeit my xhtml validation. This thing is forcing my mind into circular logic!EDIT:I'm trying to achieve this./EDITI thank you once again, and like to wish you a happy holidays. Please spend it with your family and not behind a pc. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...