Page 1 of 1

Validazione W3C del modulo Search

Posted: Wed Jun 17, 2009 9:29 am
by cimberio
Ciao a tutti !

Utilizzando il modulo Search versione 1.5.3. mi sono accorto che produce 3 errori sulla validazione W3C per XHTML Strict 1.0!

Gli errori sono i seguenti:

Code: Select all

# Line 63, Column 1: [b]character data is not allowed here[/b]

: <input type="text" name="cntnt01searchinput" id="cntnt01searchinput" valu

You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:

    * putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
    * forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
    * using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.

# Error Line 63, Column 243: [b]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[/b]

…'') this.value=this.defaultValue;" />

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

# Error Line 64, Column 51: [b]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[/b]

<input name="submit" value="Invia" type="submit" />

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>").
Il codice generato dalla pagina alle righe in questione recita:

Code: Select all

: <input type="text" name="cntnt01searchinput" id="cntnt01searchinput" value="Cerca nel sito" size="20" maxlength="50" onfocus="if(this.value==this.defaultValue) this.value='';" onblur="if(this.value=='') this.value=this.defaultValue;" /> 
<input name="submit" value="Invia" type="submit" />
Come posso rimuovere questi errori? Non capisco se è sufficiente scrivere in modo corretto il Modello ricerca e il Modello risultato del modulo Search o se bisogna intervenire più a fondo...  ???

Grazie per eventuali suggerimenti.

Cimberio

Re: Validazione W3C del modulo Search

Posted: Wed Jun 17, 2009 10:01 am
by alby
cimberio wrote: Come posso rimuovere questi errori? Non capisco se è sufficiente scrivere in modo corretto il Modello ricerca e il Modello risultato del modulo Search o se bisogna intervenire più a fondo...  ???
hai fatto qualche ricerca ...  ::)

http://forum.cmsmadesimple.org/index.ph ... #msg134870
http://forum.cmsmadesimple.org/index.ph ... #msg111696

Alby