Kom ihåg mig?
Home Menu

Menu


Städar upp min kod

 
Ämnesverktyg Visningsalternativ
Oläst 2006-09-27, 11:34 #1
cezar cezar är inte uppkopplad
Medlem
 
Reg.datum: Apr 2006
Inlägg: 260
cezar cezar är inte uppkopplad
Medlem
 
Reg.datum: Apr 2006
Inlägg: 260
En grej den klagar på är mina länkar i mitt nyhetsscript som ser ut såhär:

http://manu6.manufrog.com/~johnnynu/cutene...=1&ampnumber=10

Från början länkade jag bara med '&' istället för '&amp' men det är ändrat så den borde inte klaga nu?

Citat:

Warning Line 33, column 104: cannot generate system identifier for general entity "ampnumber" .
...johnnynu/cutenews/rss.php?category=1&ampnumber=10">

An entity reference was found in the document, but there is no reference by that name defined. Often this is caused by misspelling the reference name, unencoded ampersands, or by leaving off the trailing semicolon (. The most common cause of this error is unencoded ampersands in URLs as described by the WDG in "Ampersands in URLs".

Entity references start with an ampersand (&) and end with a semicolon (. If you want to use a literal ampersand in your document you must encode it as "&" (even inside URLs!). Be careful to end entity references with a semicolon or your entity reference may get interpreted in connection with the following text. Also keep in mind that named entity references are case-sensitive; &Aelig; and æ are different characters.

If this error appears in some markup generated by PHP's session handling code, this article has explanations and solutions to your problem.

Note that in most documents, errors related to entity references will trigger up to 5 separate messages from the Validator. Usually these will all disappear when the original problem is fixed.
cezar är inte uppkopplad   Svara med citatSvara med citat
Oläst 2006-09-27, 11:43 #2
Kaffe Kaffe är inte uppkopplad
Medlem
 
Reg.datum: Dec 2003
Inlägg: 227
Kaffe Kaffe är inte uppkopplad
Medlem
 
Reg.datum: Dec 2003
Inlägg: 227
Missat ett semikolon. Du bör skriva:

Kod:
http://manu6.manufrog.com/~johnnynu/cutenews/rss.php?category=1&number=10
Med ett semikolon på slutet. Felet uppstår ju eftersom & på börjar en character entity, & står för ampersand. Nu letar den efter &ampnumber istället.
Kaffe är inte uppkopplad   Svara med citatSvara med citat
Oläst 2006-09-27, 11:53 #3
cezar cezar är inte uppkopplad
Medlem
 
Reg.datum: Apr 2006
Inlägg: 260
cezar cezar är inte uppkopplad
Medlem
 
Reg.datum: Apr 2006
Inlägg: 260
Citat:
Originally posted by Kaffe@Sep 27 2006, 11:43
Missat ett semikolon. Du bör skriva:

Kod:
http://manu6.manufrog.com/~johnnynu/cutenews/rss.php?category=1&number=10
Med ett semikolon på slutet. Felet uppstår ju eftersom & på börjar en character entity, & står för ampersand. Nu letar den efter &ampnumber istället.
Grymt. Nu försvann massa errors.
Har bara 3 errors kvar B)

Citat:

Below are the results of attempting to parse this document with an SGML parser.
Error Line 6 column 54: document type does not allow element "LINK" here.
<link href="stil.css" rel="stylesheet" type="text/css"/>

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).


Error Line 10 column 6: end tag for element "HEAD" which is not open.
</head>

The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.

If this error occured in a script section of your document, you should probably read this FAQ entry.


Error Line 12 column 5: document type does not allow element "BODY" here.
<body>
Jag undrar mom jag har missat att stänga någon tag eller så men jag hittar inget. Vore smutt om det finns något program som kan kolla igenom alla taggar...
cezar är inte uppkopplad   Svara med citatSvara med citat
Oläst 2006-09-27, 12:54 #4
Kaffe Kaffe är inte uppkopplad
Medlem
 
Reg.datum: Dec 2003
Inlägg: 227
Kaffe Kaffe är inte uppkopplad
Medlem
 
Reg.datum: Dec 2003
Inlägg: 227
Lite nyfiken på vad som genererar felmeddelandena nu?

Hur som helst:

Kod:
<link href="stil.css" rel="stylesheet" type="text/css"/>
Skall egentligen vara:
Kod:
<link href="stil.css" rel="stylesheet" type="text/css">
Självslutande element används endast i XHTML.
Kaffe är inte uppkopplad   Svara med citatSvara med citat
Oläst 2006-09-27, 13:03 #5
cezar cezar är inte uppkopplad
Medlem
 
Reg.datum: Apr 2006
Inlägg: 260
cezar cezar är inte uppkopplad
Medlem
 
Reg.datum: Apr 2006
Inlägg: 260
Citat:
Originally posted by Kaffe@Sep 27 2006, 12:54
Lite nyfiken på vad som genererar felmeddelandena nu?

Hur som helst:

Kod:
<link href="stil.css" rel="stylesheet" type="text/css"/>
Skall egentligen vara:
Kod:
<link href="stil.css" rel="stylesheet" type="text/css">
Självslutande element används endast i XHTML.
Ok, ja det är jag med .
Det hjälpte inte att jag tog bort '/'.

Citat:

Error Line 6 column 54: document type does not allow element "LINK" here.
<link href="stil.css" rel="stylesheet" type="text/css">

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).
cezar är inte uppkopplad   Svara med citatSvara med citat
Oläst 2006-09-27, 13:29 #6
Kaffe Kaffe är inte uppkopplad
Medlem
 
Reg.datum: Dec 2003
Inlägg: 227
Kaffe Kaffe är inte uppkopplad
Medlem
 
Reg.datum: Dec 2003
Inlägg: 227
I så fall har du ett felaktigt nästlat element.

Om du absolut inte hittar det själv får du prova exempelvis:
http://infohound.net/tidy/
eller
http://tidy.sourceforge.net/
Kaffe är inte uppkopplad   Svara med citatSvara med citat
Oläst 2006-09-27, 16:05 #7
cezar cezar är inte uppkopplad
Medlem
 
Reg.datum: Apr 2006
Inlägg: 260
cezar cezar är inte uppkopplad
Medlem
 
Reg.datum: Apr 2006
Inlägg: 260
Den hittar 0 errors, 1 warning på en div som inte innehåller något i html koden.
Det ligger en class i den som har en del värden, så som bakrundsbild m.m.
Nu validerar i allafall css filen som HTML 4.01 så den borde inte kunna ställa till med något.
cezar är inte uppkopplad   Svara med citatSvara med citat
Oläst 2006-09-27, 16:29 #8
cezar cezar är inte uppkopplad
Medlem
 
Reg.datum: Apr 2006
Inlägg: 260
cezar cezar är inte uppkopplad
Medlem
 
Reg.datum: Apr 2006
Inlägg: 260
Det fungerade då jag öppnade alla taggar inom head. Gjorde alltså '/>' till '>'.

Nu så validerar den som HTML 4.01.
cezar är inte uppkopplad   Svara med citatSvara med citat
Oläst 2006-09-27, 20:45 #9
Kaffe Kaffe är inte uppkopplad
Medlem
 
Reg.datum: Dec 2003
Inlägg: 227
Kaffe Kaffe är inte uppkopplad
Medlem
 
Reg.datum: Dec 2003
Inlägg: 227
Citat:
Originally posted by cezar@Sep 27 2006, 16:29
Det fungerade då jag öppnade alla taggar inom head. Gjorde alltså '/>' till '>'.

Nu så validerar den som HTML 4.01.
Var ju det jag skrev ju...

Säg, validerar den nu som strict eller transitional?
Kaffe är inte uppkopplad   Svara med citatSvara med citat
Oläst 2006-09-28, 11:29 #10
cezar cezar är inte uppkopplad
Medlem
 
Reg.datum: Apr 2006
Inlägg: 260
cezar cezar är inte uppkopplad
Medlem
 
Reg.datum: Apr 2006
Inlägg: 260
Citat:
Ursprungligen postat av Kaffe
Citat:
Ursprungligen postat av cezar
Det fungerade då jag öppnade alla taggar inom head. Gjorde alltså '/>' till '>'.

Nu så validerar den som HTML 4.01.
Var ju det jag skrev ju...

Säg, validerar den nu som strict eller transitional?
Stängde 3 taggar så validerade den som strict.

Har endå en del kvar att städa...
Min tabell till gästboken validerar inte.

Kod:
<form action="sign.php" method="post">
<table class="gbok_table">
<tr>
<td>
<img class="noborder" src="images/name.gif" alt="Name" />
</td>
<td>
<input class="input" maxlength="35" name="name" type="text" />
</td>
</tr>
<tr>
<td>
<img class="noborder" src="images/email.gif" alt="Email />
</td>
<td>
<input class="input" maxlength="125" name="email" *type="text" />
</td>
</tr>
<tr>
<td>
<img class="noborder" src="images/url.gif" alt="URL" />
</td>
<td>
<input class="input" maxlength="125" name="uri" type="text" value="http://" />
</td>
</tr>
<tr>
<td>
<img class="noborder" src="images/message.gif" alt="Message" />
</td>
<td>
<textarea class="textarea" name="message"></textarea>
<td/>
</tr>
</table>
<input type="image" src="http://www.johnny.nu/blog/images/sign_gb.gif" alt="Sign GB" value="Sign Guestbook" />
</form>
7 errors!
Läs om ni orkar.
Kod:
Warning Line 48, column 0: character "<" is the first character of a delimiter but occurred as data . 
</td>

This message may appear in several cases: 
You tried to include the "<" character in your page: you should escape it as "<"
You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
Another possibility is that you forgot to close quotes in a previous tag.

✉ 
Warning Line 49, column 0: character "<" is the first character of a delimiter but occurred as data . 
<td>

✉ 
Warning Line 50, column 0: character "<" is the first character of a delimiter but occurred as data . 
<input class="input" maxlength="125" name="email" type="text" />

✉ 
Error Line 50, column 19: an attribute value literal can occur in an attribute specification list only after a VI delimiter . 
<input class="input" maxlength="125" name="email" type="text" />

Have you forgotten the "equal" sign marking the separation between the attribute and its declared value? Typical syntax is attribute="value". 

✉ 
Error Line 50, column 20: end tag for "img" omitted, but OMITTAG NO was specified . 
<input class="input" maxlength="125" name="email" type="text" />

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">". 

✉ 
Info Line 47, column 0: start tag was here . 
<img class="noborder" src="images/email.gif" alt="Email />
Error Line 66, column 41: required attribute "rows" not specified . 
<textarea class="textarea" name="message"></textarea>

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element. 

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>. 

✉ 
Error Line 66, column 41: required attribute "cols" not specified . 
<textarea class="textarea" name="message"></textarea>

✉ 
Error Line 67, column 4: document type does not allow element "td" here . 
<td/>

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). 

✉ 
Error Line 68, column 4: end tag for "td" omitted, but OMITTAG NO was specified . 
</tr>

✉ 
Info Line 65, column 0: start tag was here . 
<td>
Error Line 70, column 109: document type does not allow element "input" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag . 
...lt="Sign GB" value="Sign Guestbook" />

The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element. 

One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
cezar är inte uppkopplad   Svara med citatSvara med citat
Svara


Aktiva användare som för närvarande tittar på det här ämnet: 2 (0 medlemmar och 2 gäster)
 

Regler för att posta
Du får inte posta nya ämnen
Du får inte posta svar
Du får inte posta bifogade filer
Du får inte redigera dina inlägg

BB-kod är
Smilies är
[IMG]-kod är
HTML-kod är av

Forumhopp


Alla tider är GMT +2. Klockan är nu 16:03.

Programvara från: vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Svensk översättning av: Anders Pettersson
 
Copyright © 2017