https://wiki.whatwg.org/index.php?title=Validator.nu_Request_and_Response_Overview&feed=atom&action=historyValidator.nu Request and Response Overview - Revision history2024-03-29T15:26:33ZRevision history for this page on the wikiMediaWiki 1.39.3https://wiki.whatwg.org/index.php?title=Validator.nu_Request_and_Response_Overview&diff=10137&oldid=prevMikeSmith at 04:32, 29 December 20162016-12-29T04:32:32Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 04:32, 29 December 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{Obsolete|spec=https://github.com/validator/validator/wiki/System-»-<del style="font-weight: bold; text-decoration: none;">Request-and-response</del>}}</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{Obsolete|spec=https://github.com/validator/validator/wiki/System-»-<ins style="font-weight: bold; text-decoration: none;">Request+response</ins>}}</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This document describes the entire request/response transaction through Validator.nu.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This document describes the entire request/response transaction through Validator.nu.</div></td></tr>
</table>MikeSmithhttps://wiki.whatwg.org/index.php?title=Validator.nu_Request_and_Response_Overview&diff=10136&oldid=prevMikeSmith at 04:31, 29 December 20162016-12-29T04:31:31Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 04:31, 29 December 2016</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{Obsolete|spec=https://github.com/validator/validator/wiki/<del style="font-weight: bold; text-decoration: none;">Service:-</del>System-<del style="font-weight: bold; text-decoration: none;">backend:</del>-Request-and-response}}</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{Obsolete|spec=https://github.com/validator/validator/wiki/System-<ins style="font-weight: bold; text-decoration: none;">»</ins>-Request-and-response}}</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This document describes the entire request/response transaction through Validator.nu.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This document describes the entire request/response transaction through Validator.nu.</div></td></tr>
</table>MikeSmithhttps://wiki.whatwg.org/index.php?title=Validator.nu_Request_and_Response_Overview&diff=9875&oldid=prevMikeSmith at 01:17, 22 March 20152015-03-22T01:17:06Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 01:17, 22 March 2015</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{Obsolete|spec=https://github.com/validator/validator/wiki/Request-and-response<del style="font-weight: bold; text-decoration: none;">-overview</del>}}</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{Obsolete|spec=https://github.com/validator/validator/wiki/<ins style="font-weight: bold; text-decoration: none;">Service:-System-backend:-</ins>Request-and-response}}</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This document describes the entire request/response transaction through Validator.nu.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This document describes the entire request/response transaction through Validator.nu.</div></td></tr>
</table>MikeSmithhttps://wiki.whatwg.org/index.php?title=Validator.nu_Request_and_Response_Overview&diff=9843&oldid=prevMikeSmith at 14:17, 17 March 20152015-03-17T14:17:14Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 14:17, 17 March 2015</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>{{Obsolete|https://github.com/validator/validator/wiki/Request-and-response-overview}}</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>{{Obsolete|<ins style="font-weight: bold; text-decoration: none;">spec=</ins>https://github.com/validator/validator/wiki/Request-and-response-overview}}</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This document describes the entire request/response transaction through Validator.nu.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This document describes the entire request/response transaction through Validator.nu.</div></td></tr>
</table>MikeSmithhttps://wiki.whatwg.org/index.php?title=Validator.nu_Request_and_Response_Overview&diff=9842&oldid=prevMikeSmith at 14:16, 17 March 20152015-03-17T14:16:34Z<p></p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 14:16, 17 March 2015</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1">Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">{{Obsolete|https://github.com/validator/validator/wiki/Request-and-response-overview}}</ins></div></td></tr>
<tr><td colspan="2" class="diff-side-deleted"></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This document describes the entire request/response transaction through Validator.nu.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>This document describes the entire request/response transaction through Validator.nu.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
</table>MikeSmithhttps://wiki.whatwg.org/index.php?title=Validator.nu_Request_and_Response_Overview&diff=2854&oldid=prevHsivonen: link2008-02-15T11:35:34Z<p>link</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 11:35, 15 February 2008</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l3">Line 3:</td>
<td colspan="2" class="diff-lineno">Line 3:</td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==The Servlet==</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>==The Servlet==</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker" data-marker="−"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>The servlet has entry points for <code>GET</code>, <code>POST</code>, <code>OPTIONS</code> and <code>TRACE</code>. The super class implements HEAD by calling the <code>GET</code> entry point.</div></td><td class="diff-marker" data-marker="+"></td><td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>The <ins style="font-weight: bold; text-decoration: none;">[[Validator.nu Servlet Overview|</ins>servlet<ins style="font-weight: bold; text-decoration: none;">]] </ins>has entry points for <code>GET</code>, <code>POST</code>, <code>OPTIONS</code> and <code>TRACE</code>. The super class implements HEAD by calling the <code>GET</code> entry point.</div></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><br/></td></tr>
<tr><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The implementation for <code>TRACE</code> simply returns 405 Method Not Allowed as a tinfoil hat measure.</div></td><td class="diff-marker"></td><td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>The implementation for <code>TRACE</code> simply returns 405 Method Not Allowed as a tinfoil hat measure.</div></td></tr>
</table>Hsivonenhttps://wiki.whatwg.org/index.php?title=Validator.nu_Request_and_Response_Overview&diff=2853&oldid=prevHsivonen: Create page2008-02-15T10:53:58Z<p>Create page</p>
<p><b>New page</b></p><div>This document describes the entire request/response transaction through Validator.nu.<br />
<br />
==The Servlet==<br />
<br />
The servlet has entry points for <code>GET</code>, <code>POST</code>, <code>OPTIONS</code> and <code>TRACE</code>. The super class implements HEAD by calling the <code>GET</code> entry point.<br />
<br />
The implementation for <code>TRACE</code> simply returns 405 Method Not Allowed as a tinfoil hat measure.<br />
<br />
The implementations for <code>GET</code> and <code>OPTIONS</code> special-case /robots.txt and then delegate to <code>doPost</code> which is written to handle <code>GET</code> and <code>OPTIONS</code> in addition to <code>POST</code>.<br />
<br />
Path info and server name are tested against configuration values in the order: generic, HTML5 and parsetree. When a match is found, a controller class is instantiated for the appropriate facet and its <code>service()</code> method called for <code>GET</code> and <code>POST</code> or an in-servlet response without a controller is constructed for <code>OPTIONS</code>.<br />
<br />
==The Controller==<br />
<br />
===<code>service()</code>===<br />
<br />
The entry point is the <code>service()</code> method. It starts by setting up a bunch of variables that pertain to the whole transaction (and, from the transaction point of view, are practically constants). In particular, it sets up the output pipeline to match the requested output format.<br />
<br />
If validation is going to be performed (i.e. there is POSTed input or a GET parameter document URI), cache control is set to non-cacheable. Else, if the output format is (X)HTML, the <code>Last-Modified</code> date is set to the modification date of <code>presets.txt</code>. Else, a 400 Bad Request response is sent.<br />
<br />
Schema URLs and the parser mode setting are initialized for user input if provided (in the generic facet only).<br />
<br />
Other configurable parameters are acted on in both the HTML5 and the generic facet.<br />
<br />
The output pipeline is set up so that the <code>errorHandler</code> field points to a handler that writes into the output.<br />
<br />
If the output format is (X)HTML, the controller calls into <code>PageEmitter</code>, which will result in a call back to <code>validate()</code>. For other formats, <code>validate()</code> is called directly.<br />
<br />
===<code>validate()</code>===<br />
<br />
The entity resolver is initalized.<br />
<br />
An attempt to initialize the validator chain is made. It succeeds in the generic facet if the user has explicitly chosen schemas.<br />
<br />
<code>loadDocAndSetupParser()</code> is called. This takes different code paths for the HTML5 facet and the generic facet.<br />
<br />
The error handler is connected to the parser.<br />
<br />
The <code>SourceCode</code> instance is intitialized from the document <code>InputSource</code>.<br />
<br />
If the user has opted for normalization checking or if the schema is on autodetect, normalization checking in the parser is enabled.<br />
<br />
The parser is wrapped in <code>WiretapXMLReaderWrapper</code> that reports each parse event to <code>SourceCode</code> for location tracking before the parse event proceeds ahead in the pipeline.<br />
<br />
If the parser is the HTML parser, the error handler is set to HTML reporting mode (no namespace cruft). If the parser is the XML parser and there are namespaces to filter out, the XML parser is wrapped in a <code>NamespaceDroppingXMLReaderWrapper</code>.<br />
<br />
The error handler for the lowest level of parsin (HTML tokenizer or XML parser underneath filters) is set to the “exact” variant that identifies individual UTF-16 code units instead of whole SAX event-long source text runs.<br />
<br />
In the XML parser case, the error handler is made unchangeable in order to work around problems in <code>org.xml.sax.helpers.XMLFilterImpl</code>.<br />
<br />
The parser is wrapped in <code>AttributesPermutingXMLReaderWrapper</code> which changes the order in which the validation layer sees attributes. This improves the user experience with co-occurrence constraints.<br />
<br />
If the character encoding override is in effect, the character encoding information on the input source is changed.<br />
<br />
The parser is started. The parse causes errors to be pushed to the error handler.<br />
<br />
Various exceptions are caught and they are logged or reported as appropriate.<br />
<br />
===<code>loadDocAndSetupParser()</code> (Generic)===<br />
<br />
Behavior depends on the parser setting:<br />
<br />
====Any HTML====<br />
<br />
If the preset is an HTML-unsafe preset, an error is reported and an exception thrown. When JavaScript is on, the UI script should prevent user from hitting this case from the (X)HTML UI.<br />
<br />
The entity resolver is set to allow HTML but not XML types (subject to lax type setting). <br />
<br />
<code>loadDocumentInput()</code> is called.<br />
<br />
A new HTML parser is instantiated. The doctype expectation is set according to the chosen parser mode.<br />
<br />
An attempt to initialize the validator chain is made. It succeeds in the parser is set to a specific HTML flavor. The controller is set as a handler for the doctype callback from the parser.<br />
<br />
====Either XML====<br />
<br />
The entity resolver is set to allow XML but not HTML types (subject to lax type setting).<br />
<br />
<code>loadDocumentInput()</code> is called.<br />
<br />
An XML parser is initialized according to the chosen external entity mode.<br />
<br />
If the validator is still <code>null</code> at this point, the <code>BufferingRootNamespaceSniffer</code> is added to the filter pipeline with the controller as the callback handler.<br />
<br />
====Auto====<br />
<br />
The entity resolver is set to allow both XML and HTML types.<br />
<br />
<code>loadDocumentInput()</code> is called.<br />
<br />
If the <code>Content-Type</code> of the document is <code>text/html</code> proceed as in the auto-HTML case.<br />
<br />
Else, proceed as in the no external entities XML case.<br />
<br />
===<code>loadDocAndSetupParser()</code> (HTML5)===<br />
<br />
The entity resolver is set to <code>Accept</code> <code>application/xhtml+xml</code> and <code>text/html</code>.<br />
<br />
<code>loadDocumentInput()</code> is called.<br />
<br />
If the <code>Content-Type</code> of the document is <code>text/html</code> set up the validator chain with the HTML5 preset and instantiate the HTML parser with the HTML5 doctype expectation.<br />
<br />
Else set up the validator chain with the XHTML5+SVG1.1+MathML2 preset instantiate the XML parser set not to load external entities.<br />
<br />
===<code>loadDocumentInput()</code>===<br />
<br />
If the request method was <code>GET</code> or <code>HEAD</code> load the document using the entity resolver and set up the result as the validator input.<br />
<br />
Else (<code>POST</code> case) set up the validator input from the request body and the <code>Content-Type</code> and (optionally) <code>Content-Location</code> headers. (Note: Servlet filters emulate straight <code>POST</code> in the HTML form submission case, so the servlet always treat the request as a straight <code>POST</code>.)<br />
<br />
<br />
<br />
[[Category:Validator.nu Documentation]]</div>Hsivonen