Advertisement

05.07.2008 at 12:28AM PDT, ID: 23381872
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Problems with validation
Tags: php, mysql, xhtml, html
Hi. I'm currently developing a website that uses php. However, I want to be able to have it validated so I tried coding it in xhtml strict so it will be coded properly. What's funny is that when I take off that one line of php, it says it's validates, but if i retain my php line it gives me three errors.


-----------------------------------------
Validation Output:  3 Errors

   1. Error Line 13, Column 5: document type does not allow element "html" here.

      <html>

            

      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).
   2. Error Line 13, Column 1: Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml.

      <html>

            

      Many Document Types based on XML need a mandatory xmlns="" on the root element. For example, the root element for XHTML will look like:
      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   3. Error Line 35, Column 17: there is no attribute "language".

      <script language="javascript" type="text/javascript" src="menu.js">

            

      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 <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

-----------------------------------------

I hope you can help me with this. Thanks in advance.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
Here's my index.php:
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="Matus Jewellery. Personalized Service At Its Best." />
<meta name="keywords" content="matus, jewellery, wedding, engagement, carat, diamond, 
 
personalized, service, couple, gold, white gold, yellow gold, two tone, ring, band, 
 
philippines, manila" />
<title>Matus Jewellery</title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="stylematus.css" type="text/css" media="screen" />
</head>
<body>
<div id="site">
<?php @ require_once ("layout.html"); ?> 
<div id="newsevents"> <img src="images/news.jpg" alt="" /> </div>
 
<div id="site2">
<div id="blogContent">
<div id="blogColor"><p class="right">
May 5, 2007
<br />Lorem Ipsum
</p></div>
 
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Phasellus rutrum. Morbi auctor 
 
pretium elit. Morbi adipiscing tellus eu justo. Etiam eget justo vitae metus ornare lobortis. 
 
Donec ultricies neque a neque. In varius, lorem eget vulputate pulvinar, nulla ligula porta 
 
est, vel iaculis metus leo vitae dolor. Donec luctus commodo erat. Lorem ipsum dolor sit 
 
amet, consectetuer adipiscing elit. Curabitur nibh magna, adipiscing vel, lacinia ut, 
 
tincidunt vitae, neque. Maecenas fermentum ultrices sapien. Sed condimentum sollicitudin 
 
nisl. Nam ut ipsum vel sapien laoreet consectetuer. Nunc ac ante.
<br /><br /><br />
</div>
<img src="images/featured.jpg" class="picol" alt="" />
<a href=""><img src="images/fengage.jpg" class="picol" alt="" /></a>
<a href=""><img src="images/fwedding.jpg" class="picol" alt="" /></a>
<a href="couples.php"><img src="images/ffeat.jpg" class="picol" alt="" /></a>
<p></p>
<img src="images/back.jpg" class="picol" alt="" />
<p></p>
<img usemap="#rect"
         alt=""
         src="images/links.jpg"
         style="width: 743px;
                height: 15px;
                border: 0px;
		float: left;" />
 
       	<map name="rect" id="rect">
         <area shape="rect"
          coords="66,  0,  143,  12"
           href="http://www.weddingsatwork.com/"
           alt=""
           title="" />  
 
         <area shape="rect"
          coords="142,  -1,  224,  12"
           href="http://www.themesandmotifs.com/"
           alt=""
           title="" />    
 
         <area shape="rect"
          coords="225,  -6,  297,  12"
           href="http://www.josiahcatering.com/"
           alt=""
           title="" />       
 
         <area shape="rect"
          coords="298,  -4,  357,  12"
           href="http://www.mykonsepto.com/"
           alt=""
           title="" />
 
         <area shape="rect"
          coords="359,  -4,  441,  12"
           href="http://www.bestweddingsites.com/"
           alt=""
           title="" />
 
         <area shape="rect"
          coords="441,  -7,  534,  12"
           href="http://www.treasuredmemories.com.ph/"
           alt=""
           title="" />
 
         <area shape="rect"
          coords="536,  -2,  575,  12"
           href="http://www.tnmgifts.com/"
           alt=""
           title="" />
  
         <area shape="rect"
          coords="575,  -5,  642,  13"
           href="http://imagine-nation.org/"
           alt=""
           title="" />
 
         <area shape="rect"
          coords="644,  -3,  684,  12"
           href="http://dinolara.com/"
           alt=""
           title="" />
   
         <area shape="rect"
          coords="686,  0,  742,  12"
           href="http://passionistta.com/"
           alt=""	
           title="" />
       	</map>
</div>
 
</div>
</body>
</html>
 
And my layout.html (instance)
 
<html>
<head>
<title>Matus Jewellery</title>
<link rel="stylesheet" href="menu.css" type="text/css" media="screen" />
</head>
<body>
<div class="line"> <div class="a"> </div> </div>
<div class="line"> <div class="b"> </div> </div>
<div class="line"> <div class="c"> </div> </div>
<div class="line"> <div class="d"> </div> </div>
<div class="line"> <div class="e"> </div> </div>
<div class="line"> <div class="f"> </div> </div>
<div class="line"> <div class="g"> </div> </div>
<div class="line"> <div class="h"> </div> </div>
<div class="line"> <div class="i"> </div> </div>
<div class="line"> <div class="j"> </div> </div>
<div class="line"> <div class="k"> </div> </div>
<div class="line"> <div class="l"> </div> </div>
 
<div id="gif"> <a href="index.php"> <img src="images/matus.gif" class="pico" alt="" /> </a> 
 
</div>
 
<div id="navmenu">
<script language="javascript" type="text/javascript" src="menu.js">
</script>
<script language="javascript" type="text/javascript" src="menu_items.js"></script>
<script language="javascript" type="text/javascript" src="menu_tpl.js"></script>
<script language="javascript" type="text/javascript">
<!--
	new menu (MENU_ITEMS, MENU_POS);
-->
</script>
</div>
</body>
</html>
Start your free trial to view this solution
Question Stats
Zone: Web Development
Question Asked By: perfecshan
Solution Provided By: Xyptilon2
Participating Experts: 2
Solution Grade: A
Views: 6
Translate:
Loading Advertisement...
05.07.2008 at 12:54AM PDT, ID: 21513972

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 01:25AM PDT, ID: 21514166

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 01:31AM PDT, ID: 21514203

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 02:24AM PDT, ID: 21514502

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 02:29AM PDT, ID: 21514528

Rank: Master

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
05.07.2008 at 02:36AM PDT, ID: 21514579

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
05.07.2008 at 12:54AM PDT, ID: 21513972

Rank: Master

What is the contents of layout.html, are you sure you are not nesting anything?
 
05.07.2008 at 01:25AM PDT, ID: 21514166
layout.html contains the menu, the images, everything that's just for the "pretty" purpose. you can see it in line 128 of the code snippet.
 
05.07.2008 at 01:31AM PDT, ID: 21514203

Rank: Master

Therein lies the problem, it wont pass xhtml 1.0 strict because your document has more than 1 html tag. if you inlude layout.html you have to omit the html, head and body tags. Just assume they are in the master page that calls require_once('layout.html');
 
05.07.2008 at 02:24AM PDT, ID: 21514502
Hi xyptilon2,

I took out the html, head and body tags and now I'm down to 1 error. (Thanks btw.)

---------------------------------------------

Validation Output:  1 Error

   1. Error Line 33, Column 17: there is no attribute "language".

      <script language="javascript" type="text/javascript" src="menu.js"></script>

            

      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 <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash.

---------------------------------------------

I dunno what to do with my javascript code.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
Here's the part with javascript:
 
<div id="navmenu">
<script language="javascript" type="text/javascript" src="menu.js"></script>
<script language="javascript" type="text/javascript" src="menu_items.js"></script>
<script language="javascript" type="text/javascript" src="menu_tpl.js"></script>
<script language="javascript" type="text/javascript">
<!--
	new menu (MENU_ITEMS, MENU_POS);
-->
</script>
Open in New Window
 
05.07.2008 at 02:29AM PDT, ID: 21514528

Rank: Master

Just remove "language="javascript"" its already specified in the type
Accepted Solution
 
05.07.2008 at 02:36AM PDT, ID: 21514579
Woo validated.
Thank you xyptilon2 :) I really appreciate it.
 
 
05.07.2008 at 05:17AM PDT, ID: 21515525
And to put the html back in, you could wrap in xml tags:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <title>Bla</title>
  </head>
  <body>
  </body>
</html>
 
 
 
20080236-EE-VQP-29 / EE_QW_2_20070628