/sources/validation.php

Description
Functions
check_xhtml (line 495)

Check the specified XHTML, and return the results.

  • return: Error information (NULL: no error)
?map check_xhtml (string $out, [boolean $well_formed_only = false], [boolean $is_fragment = false], [boolean $validation_javascript = true], [boolean $validation_css = true], [boolean $validation_wcag = true], [boolean $validation_compat = true], [boolean $validation_ext_files = true], [boolean $validation_manual = false])
  • string $out: The XHTML to validate
  • boolean $well_formed_only: Whether to avoid checking for relational errors (false implies just a quick structural check, aka a 'well formed' check)
  • boolean $is_fragment: Whether what is being validated is an HTML fragment, rather than a whole document
  • boolean $validation_javascript: Validate javascript
  • boolean $validation_css: Validate CSS
  • boolean $validation_wcag: Validate WCAG
  • boolean $validation_compat: Validate for compatibility
  • boolean $validation_ext_files: Validate external files
  • boolean $validation_manual: Bring up messages about manual checks
fix_entities (line 929)

Fix any invalid entities in the text.

  • return: Fixed result
string fix_entities (string $in)
  • string $in: Text to fix in
init__validation (line 31)

Standard code module initialisation function.

void init__validation ()
is_hex (line 877)

Checks to see if a string holds a hexadecimal number.

  • return: Whether the string holds a hexadecimal number
boolean is_hex (string $string)
  • string $string: The string to check
test_entity (line 891)

Test the next entity in the output stream.

  • return: An array of error details (NULL: no errors)
?mixed test_entity ([integer $offset = 0])
  • integer $offset: Checking offset
_check_tag (line 1430)

Checks an XHTML tag for validity, including attributes. Return the results.

  • return: String for tag basis form, or array of error information
mixed _check_tag (string $tag, map $attributes, boolean $self_close, boolean $close, list $errors)
  • string $tag: The name of the tag to check
  • map $attributes: A map of attributes (name=>value) the tag has
  • boolean $self_close: Whether this is a self-closing tag
  • boolean $close: Whether this is a closing tag
  • list $errors: Errors detected so far. We will add to these and return
_get_next_tag (line 979)

Get the next tag in the current XHTML document.

  • return: Either an array of error details, a string of the tag, or NULL for finished (NULL: no next tag)
?mixed _get_next_tag ()
_get_tag_basis (line 1469)

Get the tag basis for the specified tag. e.g. '
' would become 'br'. Note: tags with parameters given are not supported.

  • return: The basis of the tag
string _get_tag_basis (string $full)
  • string $full: The full tag
_xhtml_error (line 852)

Get some general debugging information for an identified XHTML error.

  • return: A map of the error information
map _xhtml_error (string $error, [string $param_a = ''], [string $param_b = ''], [string $param_c = ''], [boolean $raw = false], [integer $rel_pos = 0])
  • string $error: The error that occured
  • string $param_a: The first parameter of the error
  • string $param_b: The second parameter of the error
  • string $param_c: The third parameter of the error
  • boolean $raw: Whether to not do a lang lookup
  • integer $rel_pos: Offset position

Documentation generated on Sun, 02 Jan 2011 23:28:08 +0000 by phpDocumentor 1.4.3