Junior Member
Posts: 4
Karma: 12
Join Date: Jul 2012
Device: none
|
XHTML <form> and <input> usage
Greetings,
For a textbook, there is a search page towards the end containing a text field which is getting flagged:
Code:
<form action="" method="get">
<div>
<input name="q" type="text" value="" /> <input type="submit" value="search" /> <span class="sgc-2" id="search-progress"></span>
</div>
</form>
There are 4 errors within ePubCheck 1.2 from the above code:
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
Epubcheck Version 1.2
ERROR: C:\file.epub/OEBPS/Text/search.html(308): element "form" not allowed anywhere; e
xpected the element end-tag, text or element "a", "abbr", "acronym", "address",
"applet", "b", "bdo", "big", "blockquote", "br", "cite", "code", "del", "dfn", "
div", "dl", "em", "h1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img"
, "ins", "kbd", "map", "noscript", "ns:svg", "object", "ol", "p", "pre", "q", "s
amp", "script", "small", "span", "strong", "sub", "sup", "table", "tt", "ul" or
"var" (with xmlns:ns="http://www.w3.org/2000/svg")
ERROR: C:\file.epub/OEBPS/Text/search.html(310): element "input" not allowed anywhere;
expected text or element "a", "abbr", "acronym", "address", "applet", "b", "bdo"
, "big", "blockquote", "br", "cite", "code", "del", "dfn", "div", "dl", "em", "h
1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "ins", "kbd", "map
", "noscript", "ns:svg", "object", "ol", "p", "pre", "q", "samp", "script", "sma
ll", "span", "strong", "sub", "sup", "table", "tt", "ul" or "var" (with xmlns:ns
="http://www.w3.org/2000/svg")
ERROR: C:\file.epub/OEBPS/Text/search.html(310): element "input" not allowed anywhere;
expected text or element "a", "abbr", "acronym", "address", "applet", "b", "bdo"
, "big", "blockquote", "br", "cite", "code", "del", "dfn", "div", "dl", "em", "h
1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "ins", "kbd", "map
", "noscript", "ns:svg", "object", "ol", "p", "pre", "q", "samp", "script", "sma
ll", "span", "strong", "sub", "sup", "table", "tt", "ul" or "var" (with xmlns:ns
="http://www.w3.org/2000/svg")
ERROR: C:\file.epub/OEBPS/Text/search.html(311): element "input" not allowed anywhere;
expected text or element "a", "abbr", "acronym", "address", "applet", "b", "bdo"
, "big", "blockquote", "br", "cite", "code", "del", "dfn", "div", "dl", "em", "h
1", "h2", "h3", "h4", "h5", "h6", "hr", "i", "iframe", "img", "ins", "kbd", "map
", "noscript", "ns:svg", "object", "ol", "p", "pre", "q", "samp", "script", "sma
ll", "span", "strong", "sub", "sup", "table", "tt", "ul" or "var" (with xmlns:ns
="http://www.w3.org/2000/svg")
Check finished with warnings or errors!
According to w3schools, the <form> element isn't allowed in XHTML; however even after taking out the <form> element and leaving <input> the last two errors above still appear, even with <div> or <p> tags surrounding it. Any help is appreciated!!
|