Class XMLProver::Proofreader
In: proofreader.rb
Parent: Object

Validator class

Methods
closure?    closure?    closure?    closure?    closure?    closure?    closure?    closure?    closure?    closure?    closure?    closure?    closure?    closure?    closure?    closure?    closure?   
Attributes
:errors  [R] 
:proof  [R] 
:undefined  [R] 
:xml_document  [R] 
Included modules
TomsLib::Communication
Public Class methods
new(proof=nil)
Public Instance methods
reset()

Reinitializes the errors array

valid?()

Returns whether the last document proofread was valid

use_proof(proof)

Set proof to use for validation. This also allows for adhoc validation.

use_document(xml, use_internal_proof=false)

Set target document to be validated. This also allows for adhoc validation.

  if use_internal_proof is false (default), xml can be a string, url, local path or REXML::Document
  if use_internal_proof is true, xml must be a url or local path
proofread_document(xml)

Validates a given XML document against set proof.

proofread_document_internal(xml_url)

Validates a given XML document against internal schema instructions.

regexp?(elora, die=nil)

Returns validity of element or attribute against regexp.

datatype?(elora, die=nil)

Returns validity of element or attribute against datatype.

order?(element, die=nil)

Returns validity of element against order.

closure?(element, die=nil)

Returns validity of element against closure.

range?(eloras, die)

Returns validity of the applicable array of elements or attributes against range. This markers validates in quasi-relation to the whole document.

option?()

Returns validity against option. This markers validate in relation to the whole document.

collection?()

Returns validity against collection. This markers validate in relation to the whole document.

proofread()

Validates entire document against the proofsheet.

Private Instance methods
validate_eloras(applicable_eloras, die)
content(element_or_attribute)

Returns an element's first text node or an attribute's value.