kerki: Probleme bei XHTML Strict-Validierung

Beitrag lesen

Hallo !

"Diese Seiten sind fuer die Benutzung von JavaScript pessimiert." *lol*

Mir scheint es schleierhaft, warum bspw. <blockquote><em>Zitat</em><br /><a>Quelle</a></blockquote> Fehler auslöst (Attribute gekürzt).
Ich bekomme immer die Fehler "element 'foo' not allowed here; possible cause is an inline element containing a block-level element" und "text is not allowed here; try wrapping the text in a more descriptive container".

Siehe: http://www.w3.org/TR/html401/struct/text.html#edef-BLOCKQUOTE
bzw. http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd

"<!ELEMENT blockquote %Block;>"

Will sagen: Das BLOCKQUOTE-Element darf selbst _ausschließlich_ Block-Level-Elemente enthalten, keine Inline-Elemente. (Das hieße dann %flow;: sowohl %Block;, als auch %inline;)

Daher die Fehlermeldung: "text is not allowed here; try wrapping the text in a more descriptive container"

P wäre ein 'more descriptive Container', denn er ist ein Block-Level-Element und darf (sogar nur) Inline-Elemente enthalten.

Also:
FALSCH:  <blockquote>text</blockquote>
RICHTIG: <blockquote><p>text</p></blockquote>

Die andere Fehlermeldung "element 'foo' not allowed here; possible cause is an inline element containing a block-level element" stimmt in diesem Fall nicht, aber es heißt ja auch "possible". :-)

HTH

Gruß,

kerki