A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.
To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).
Validator.nu Common Input Parameters: Difference between revisions
(→<code>schema</code>: http) |
No edit summary |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Obsolete|spec=https://github.com/validator/validator/wiki/Service-»-Common-params}} | |||
Validator.nu accepts the following parameters regardless of input method. How these parameters are communicated depends on the input method. | Validator.nu accepts the following parameters regardless of input method. How these parameters are communicated depends on the input method. | ||
Validator.nu has a generic facet at <code> | Validator.nu has a generic facet at <code>https://validator.nu/</code> and an (X)HTML5 facet at <code>https://html5.validator.nu/</code>. Some parameters apply only to the generic facet. All parameters listed here are optional. | ||
==Parameters for both the generic and HTML5 facets== | ==Parameters for both the generic and HTML5 facets== | ||
Line 23: | Line 24: | ||
| <code>json</code> | | <code>json</code> | ||
| [[Validator.nu JSON Output|JSON]] | | [[Validator.nu JSON Output|JSON]] | ||
|- | |||
| <code>gnu</code> | |||
| [[Validator.nu GNU Output|GNU error format]] | |||
|- | |- | ||
| <code>text</code> | | <code>text</code> | ||
Line 31: | Line 35: | ||
The only supported value is <code>yes</code> which means that source is shown (if supported by the output format). | The only supported value is <code>yes</code> which means that source is shown (if supported by the output format). | ||
===<code>level</code>=== | |||
The only supported value is <code>error</code> which means that only errors and non-document errors are reported. That is, informative messages ''including warnings'' are not reported. | |||
===<code>nsfilter</code>=== | |||
Space-separated list of XML namespace URIs. Elements (and their children) and attributes in those namespaces are filtered out between the XML parser and the validation layer. The filtered elements participate in ID uniqueness checking. The filter doesn’t apply to HTML parser. | |||
==Parameters for the generic facet only== | ==Parameters for the generic facet only== | ||
Line 41: | Line 53: | ||
The only supported value is <code>yes</code> which means that RFC 3023 character encoding defaults are disrespected and <code>text/html</code> is accepted as an XML MIME type. | The only supported value is <code>yes</code> which means that RFC 3023 character encoding defaults are disrespected and <code>text/html</code> is accepted as an XML MIME type. | ||
===<code>parser</code>=== | |||
{| class="wikitable" | |||
|- | |||
! align="left" | Value | |||
! align="left" | Meaning | |||
|- | |||
| ''none'' | |||
| Choice of HTML or XML parser is based on <code>Content-Type</code>. HTML parser configuration is based on doctype. XML parser does not load external entities. | |||
|- | |||
| <code>xml</code> | |||
| XML parser, will not load external entities | |||
|- | |||
| <code>xmldtd</code> | |||
| XML parser, will load external entities | |||
|- | |||
| <code>html</code> | |||
| HTML parser, configuration is based on doctype. | |||
|- | |||
| <code>html5</code> | |||
| HTML parser in the HTML5 mode. | |||
|- | |||
| <code>html4</code> | |||
| HTML parser insisting on HTML 4.01 Strict doctype and emitting additional HTML 4 errors that are not HTML5 errors. | |||
|- | |||
| <code>html4tr</code> | |||
| HTML parser insisting on HTML 4.01 Transitional doctype and emitting additional HTML 4 errors that are not HTML5 errors. | |||
|} | |||
==Format-Specific Parameters== | |||
These parameters are specific to only some output formats. | |||
===<code>asciiquotes</code>=== | |||
The only supported value is <code>yes</code> which means that ASCII quotes and apostrophes will be substituted for the Unicode smart quotes. This parameter only applies with <code>out=text</code> and <code>out=gnu</code>. The output may still contain Unicode characters in general. | |||
===<code>callback</code>=== | |||
When this parameter is present, its value is taken to be the name of a JavaScript callback function to which the JSON object is given as an argument. This parameter only applies with <code>out=json</code>. The value must not be a JavaScript reserved word. | |||
==See also== | |||
*[[Validator.nu Web Service Interface]] | |||
[[Category:Validator.nu Documentation]] |
Latest revision as of 04:21, 29 December 2016
This document is obsolete.
For the current specification, see: https://github.com/validator/validator/wiki/Service-»-Common-params
Validator.nu accepts the following parameters regardless of input method. How these parameters are communicated depends on the input method.
Validator.nu has a generic facet at https://validator.nu/
and an (X)HTML5 facet at https://html5.validator.nu/
. Some parameters apply only to the generic facet. All parameters listed here are optional.
Parameters for both the generic and HTML5 facets
out
Value | Format |
---|---|
none | HTML |
xhtml
|
XHTML |
xml
|
XML |
json
|
JSON |
gnu
|
GNU error format |
text
|
Human-readable text (not for machine parsing) |
showsource
The only supported value is yes
which means that source is shown (if supported by the output format).
level
The only supported value is error
which means that only errors and non-document errors are reported. That is, informative messages including warnings are not reported.
nsfilter
Space-separated list of XML namespace URIs. Elements (and their children) and attributes in those namespaces are filtered out between the XML parser and the validation layer. The filtered elements participate in ID uniqueness checking. The filter doesn’t apply to HTML parser.
Parameters for the generic facet only
schema
This parameter takes a space-separated list of schema IRIs (http
or https
). The schemas can be RELAX NG 1.0 schemas, Schematron 1.5 schemas or identifiers for built-in non-schema-based checkers.
laxtype
The only supported value is yes
which means that RFC 3023 character encoding defaults are disrespected and text/html
is accepted as an XML MIME type.
parser
Value | Meaning |
---|---|
none | Choice of HTML or XML parser is based on Content-Type . HTML parser configuration is based on doctype. XML parser does not load external entities.
|
xml
|
XML parser, will not load external entities |
xmldtd
|
XML parser, will load external entities |
html
|
HTML parser, configuration is based on doctype. |
html5
|
HTML parser in the HTML5 mode. |
html4
|
HTML parser insisting on HTML 4.01 Strict doctype and emitting additional HTML 4 errors that are not HTML5 errors. |
html4tr
|
HTML parser insisting on HTML 4.01 Transitional doctype and emitting additional HTML 4 errors that are not HTML5 errors. |
Format-Specific Parameters
These parameters are specific to only some output formats.
asciiquotes
The only supported value is yes
which means that ASCII quotes and apostrophes will be substituted for the Unicode smart quotes. This parameter only applies with out=text
and out=gnu
. The output may still contain Unicode characters in general.
callback
When this parameter is present, its value is taken to be the name of a JavaScript callback function to which the JSON object is given as an argument. This parameter only applies with out=json
. The value must not be a JavaScript reserved word.