Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Programming. | 3 guests
Acmlm's Board - I2 Archive - Programming - XHTML
  
User name:
Password:
Reply:
 

UserPost
Tuvai
Posts: 188/211
That's supposed to work if you have that right in top of your .html/.html document.
Exadis
Posts: 4/32
Thats cool, I added that thanks Tuvai. One more problem came up thou, probly me still being a newbie when it comes to XHTML but ...

"
Fatal Error: No DOCTYPE specified!
I could not parse this document, because it does not include a DOCTYPE Declaration. A DOCTYPE Declaration is mandatory for most current markup languages and without such a declaration it is impossible to validate this document.
"
What I have for my script , or the DOCTYPE is ...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
Tuvai
Posts: 186/211
That's because you are missing the meta tag which tells the browser (or SGML parser, which the validator uses) whatcharacter encoding your page is using.

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
Exadis
Posts: 3/32
Heh, I guess it was pretty stupid. Well then back to the basic problem. I changed it to '.htm' to '.xhtml' and it dident validate, and changed it to '.html' and none worked. The error I get is this.

"
was not able to extract a character encoding labeling from any of the valid sources for such information. Without encoding information it is impossible to validate the document. The sources I tried are:

The HTTP Content-Type field.
The XML Declaration.
The HTML "META" element.
And I even tried to autodetect it using the algorithm defined in Appendix F of the XML 1.0 Recommendation.

Since none of these sources yielded any usable information, I will not be able to validate this document. Sorry. Please make sure you specify the character encoding in use.

"
Thats what I get when I change the document to .xhtml .htm or .html
Here is the actual script just for refrence.
<!DOCTYPE html PUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN"<br>"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<base target="_blank" />
<title>Learn it yourself !!!</title>
</head>
<body>
<div align='center'>
<br />
<br />
<table width='50%' bgcolor='000000'>
<tr>
<td>
<center><font face='verdana' size='1' color='FFFFFF'><b>You are a <s>idiot</s></b></font></center>
</td>
</tr>
</table>
<br />
<br />
<br />
<br />
<br />
</div>
</body>
</html>


Now for some reason this doesnt work when I validate it, but when I turn it to .xml it does. Thats the problem I need to figure out. Again forgive any horriably newb comments.
Tuvai
Posts: 182/211
XML is something different than HTML and XHTML, and changing the <html> tags to <xml> is pretty stupid.

XML is a standarized data storage type, the fact it's plain text and it's structure is simple, means it can be compatible with anything. XML isn't meant for layouting for which you use (X)HTML. You can, however, make an XSL (eXtensuible Styleheet Language) file, which is a stylesheet for your XML page. In an XSL file you can use normal (X)HTML and you can pretty much loop the data in the XML file, sort of like you can do with data in a server sidelanguage,

I have a few easy examples on my localhost (you can view the exact source of both of them):
Monsters.XML (the actual XML page, 'decorated' with the XSL stylesheet)
Monsters.XSL (stylesheet)

I've started using XML and XSL a while ago and I'm very fond of it; can be used for anything from an easy updatable HTML webpage to a logfile library.
Acmlm
Posts: 529/1173
Uh, XML isn't HTML ... XHTML is just a new form of HTML conforming to XML standards And .xml pages always only show the XML code, not an actual page ...

And why wouldn't just plain .htm work? Ever tried .xhtml?
Exadis
Posts: 1/32
Okiem im a total newb on this, just wanted to take a break from PHP for awhile and learn this, so forgive any newbie type comments.

Im trying to make a very very simple XHTML webpage, also validateing it to make sure there are no errors. For some reason I have to change my webpage from 'htm' to 'xml' I have no idea if your suppose to or not but hey. I validate it after turning it into '.xml' and I get no errors cool. When I try to look at it useing '.xml' in the url I get ...

" The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


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

Use of default namespace declaration attribute in DTD not supported. Error processing resource 'http://www.members.lycos.co.uk/sephforums/scripts.xml'. Line 4, Position 7


<html> "

So I desided to change the <html> tags to 'xml' because I dotn know what the eff im doing lol, and it worked. I could then view it in an all white page showing you all the code but not the page, just the codeing for it. I then scan THAT for validation and it says "error xml is not a valid element "

So now im stuck with a version '.htm' and 'xml' and there both screwed up. Anyone have any insight on my problem, i tried looking up tutorials but im makeing such a newbie mistake , wich they dont, or from what i seen, cover it. Any help would be apreciated.
Acmlm's Board - I2 Archive - Programming - XHTML


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.006 seconds.