Function __global->check_xhtml

Definitions

sources/webstandards.php

  • Check the specified XHTML, and return the results.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$out string No No required parameter N/A N/A The XHTML to check
$well_formed_only boolean No No False N/A N/A Whether to avoid checking for relational errors (false implies just a quick structural check, aka a 'well formed' check)
$is_fragment boolean No No False N/A N/A Whether what is being checked is an HTML fragment, rather than a whole document
$webstandards_javascript boolean No No True N/A N/A Validate javascript
$webstandards_css boolean No No True N/A N/A Validate CSS
$webstandards_wcag boolean No No True N/A N/A Validate WCAG
$webstandards_compat boolean No No True N/A N/A Validate for compatibility
$webstandards_ext_files boolean No No True N/A N/A Validate external files
$webstandards_manual boolean No No False N/A N/A Bring up messages about manual checks
$webstandards_csp boolean No No False N/A N/A Bring up messages about CSP

Returns

  • Parse information
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Check the specified XHTML, and return the results.
 *
 * @param  string $out The XHTML to check
 * @param  boolean $well_formed_only Whether to avoid checking for relational errors (false implies just a quick structural check, aka a 'well formed' check)
 * @param  boolean $is_fragment Whether what is being checked is an HTML fragment, rather than a whole document
 * @param  boolean $webstandards_javascript Validate javascript
 * @param  boolean $webstandards_css Validate CSS
 * @param  boolean $webstandards_wcag Validate WCAG
 * @param  boolean $webstandards_compat Validate for compatibility
 * @param  boolean $webstandards_ext_files Validate external files
 * @param  boolean $webstandards_manual Bring up messages about manual checks
 * @param  boolean $webstandards_csp Bring up messages about CSP
 * @return array Parse information
 */

function check_xhtml(string $out, bool $well_formed_only = false, bool $is_fragment = false, bool $webstandards_javascript = true, bool $webstandards_css = true, bool $webstandards_wcag = true, bool $webstandards_compat = true, bool $webstandards_ext_files = true, bool $webstandards_manual = false, bool $webstandards_csp = false) : array