Xhtml Validation

Started on the old forum in February 2009 · view the original in the archive · old links redirect here

15 replies · 777 views · started 17 years ago · 1 min read

2 participants
morse Senior · 364 posts #1

I have CODE<?php //header("Content-type: application/vnd.wap.xhtml+xml"); header("Cache-Control: no-cache, must-revalidate"); // Prevent caching, HTTP/1.1 header("Pragma: no-cache"); echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>"; echo "<!DOCTYPE html PUBLIC \"-//WAPFORUM//DTD XHTML Mobile 1.0//EN\" \"http://www.wapforum.org/DTD/xhtml-mobile10.dtd\">"; ?>

<html xmlns="http://www.w3.org/1999/xhtml"> <?php at the top of my page and then i have my main page start like the following CODEif($action=="main") { addvisitor(); addonline(getuid_sid($sid),"Main Menu","index.php?action=$action"); $nick = getnick_sid($sid); echo "<head>"; echo "<title>$nick@$sitename</title>"; echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\">"; echo "</head>"; echo "<body>"; I used w3c validator and got 5 errors, 3 of which are xml parsing errors I am loosing people visiting my site coz their browser goes bust when they try to access my index.php I will detail the errors in the consecutive post

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

morse Senior · 364 posts #2

the first error is CODE# Error Line 2, Column 119: end tag for "link" omitted, but OMITTAG NO was specified.

…ef="../themes/blue_medium.css"></head><body>External image (may be gone)" instead of ">".

the second is CODEError Line 2, Column 216: there is no attribute "align".

…3:55 - Wed 25th Feb 09 Welcome back admin FO w3cvalidator says 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).

further .. the third error is CODELine 2, Column > 80: XML Parsing Error: Opening and ending tag mismatch: link line 2 and head.

…ink rel="stylesheet" type="text/css" href="../themes/blue_medium.css"></head>…

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

morse Senior · 364 posts #3

lastly the fourth and the fifth are CODELine 2, Column > 80: XML Parsing Error: Opening and ending tag mismatch: head line 2 and html.

…ink rel="stylesheet" type="text/css" href="../themes/blue_medium.css"></head>…

Line 2, Column > 80: XML Parsing Error: Premature end of data in tag html line 1.

…ink rel="stylesheet" type="text/css" href="../themes/blue_medium.css"></head>…

Sorry for putting up this lengthy description, But the eroors are very confusing. Getting an eroor for something which is supposed to be correct is strange .. or maybe its not correct. Please help me get rid of those and if anybody knows then plz guide me as to where should i put the html compression code ??? I know its boring and annoying to read all this but plz help me out with this

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

subzero Super moderator Fellow · 3,954 posts #4

see this !!

 echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"../themes/$theme[0]\"/>";

You didnt close the link try now with that.

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

morse Senior · 364 posts #5

that just did the magic bro... thank you very much. My 5 validation errors are now reduced to 1. so what should i do now ?? the validator is asking me to change my headers to transitional document type. Will that give any problem ?? And how can i use cache to save loading time ? hope am not bugging you for too much .. reducing 5 errors to 1 error was already a big accomplishment .. thanks 🙂

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

subzero Super moderator Fellow · 3,954 posts #6

Dont use or or

do this when you wont the script to to use

Do this

Hello world!!

that will pass

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

subzero Super moderator Fellow · 3,954 posts #7

also dont use

use

Only use cache on a site that is not chat or forums or sql that users and you use inputs etc

only use cache as like download and index where ppl see it then cut the cache when they login..

header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Cache-Control: no-cache"); header("Pragma: no-cache");

or

<meta http-equiv="Cache-Control" content="no-cache"/> <meta http-equiv="Cache-Control" content="max-age=0"/> <meta http-equiv="Cache-Control" content="must-revalidate"/>

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

morse Senior · 364 posts #8

Thanks Sub all your suggestions helped and was able to clear one action page .. but now got problem on main page xml parsing error and 8 errors on validator 🙁 CODE/////////////////////////Main Page Here echo "<head>"; echo "<title>$sitename</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/white_medium.css"/>"; echo "<link rel="shortcut icon" href="web/favicon.ico" type="image/x-icon"/>\n"; echo "</head>"; echo "<body>"; echo "<img src="../images/logo.gif" alt=""/> "; $now = time(); $time = time() + (7 * 30 * 60); $newtime = date("H:i",$time); $date = strtotime('-12 hours'); $newdate = date('D jS M y',$date); echo "".$newtime." - ".$newdate.""; echo " "; echo "Welcome to $sitename Community, please Feel Free To Browse and invite all your friends ;o) "; echo " wap2.0/xhtml works with any pc browser n most mobiles "; echo "<form action="login.php" method="get"> "; echo "Username: <input align="center" name="loguid" size="12" maxlength="12"/> "; echo "Password: <input align="center" type="password" name="logpwd" size="10" maxlength="10"/> "; echo "<input type="submit" value="Login!">

</form>"; echo " "; echo "<a href=\"index.php?action=gforumindx\">***Guest Access***</a> "; echo "<a href=\"..mail/mail.php?action=sende\">!!!SEND INSTANT-MAIL TO SITE ADMIN!!!</a> "; echo " Not registered yet? <a href=\"register.php\">Register</a> "; echo " <a href=\"index.php?action=terms&amp;sid=$sid\">Site Rules</a> "; echo "<a href=\"http://surfwap.com/?site=rock0n\">SurfWap</a> "; echo " "; echo " "; $onu = getnumonline()+10; echo "Members Inside: $onu

"; echo "<a href="../wap/index.php">Wap 1.0(wml) Version</a> "; echo "©2007 $sitename"; echo "</body>"; If you are able to suggest then it be really wonderful, else i guess i will have to learn implementing xhtml with php

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

subzero Super moderator Fellow · 3,954 posts #9

try not to use use this and remember to change to

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

morse Senior · 364 posts #10

wont that have implications with my css ?? coz bro my css is supposed to render everyting in div to a certain colour.... that would just mess the look completely ... aint there any other way out ? why does xhtml has to this harsh ? 🙁

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

subzero Super moderator Fellow · 3,954 posts #11

no it wont do any just align it thats all

its like <p do

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

morse Senior · 364 posts #12

Thanks for all the help sub ... 🙂

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

subzero Super moderator Fellow · 3,954 posts #13

all passed ??

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

morse Senior · 364 posts #14

ya all passed but this script is a mess bro. It takes hours to correct everything ... its rather a data entry operator work than building a script .... way too tiresome. Didnt know that xhtml validation was that really strict.

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

subzero Super moderator Fellow · 3,954 posts #15

my site taken me 1 month to now how it is lol

its made so clear that i didnt miss any holes or make them lol

Visit: Chat4u.mobi - The New Lay Of being a site of your dreams! Visit: WapMasterz Coming Back Soon!


SCRIPTS FOR SALE BY SUBZERO Chat4u Script : coding-talk.com/f28/chat4u-mobi-script-only-150-a-17677/ - > Best Script for your site no other can be hacked by sql or uploaders. FileShare Script : coding-talk.com/f28/file-wap-share-6596/ -> Uploader you will never regret buying yeah it mite be old now but it still seems to own others... _______…

morse Senior · 364 posts #16

lolz then i guess i will take 5 months to get to that perfection

tinyurl.com/earnbymobile Easy earning for Indians

Alternative mobile advertising network .. Minimum 100 USD pay / NET15 pay cycle, Good Brand, Best targeting for Android goo.gl/6vub3

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close