eZPublish  3.8
eZSchema Class Reference

eZSchema handles schema validation on dom documents More...

Public Member Functions

 eZSchema ()
 
 printSchemaNode ($node, $level)
 
 printSchemaTree ()
 
 printTree ($dom)
 
 setSchema (&$schemaDocument)
 
 setSchemaFromFile ($url)
 
 validate ($dom)
 

Public Attributes

 $Annotation = ""
 Description or the schema. More...
 
 $Elements = array()
 Contains the schema elements, elements are indexed by their name. More...
 
 $RootPrefix
 Contains the schema root namespace prefix. More...
 
 $ValidationRoot = false
 Contains the validation root. More...
 

Private Member Functions

parseElement (&$schemaNode, $parentElement=false)
 
 printElement (&$element, &$dom, $level)
 
 validateNode (&$domNode, &$schemaElement)
 

Detailed Description

eZSchema handles schema validation on dom documents

Member Function Documentation

eZSchema::eZSchema ( )

Constructs a new schema element.

& eZSchema::parseElement ( $schemaNode,
  $parentElement = false 
)
private

Parses the given dom tree part and returns an element object.

Referenced by setSchema().

eZSchema::printElement ( $element,
$dom,
  $level 
)
private

Debug function. Prints the element information.

Referenced by printTree().

eZSchema::printSchemaNode (   $node,
  $level 
)

Referenced by printSchemaTree().

eZSchema::printSchemaTree ( )

Debug function to print the schema tree.

eZSchema::printTree (   $dom)

Debug function to print the document tree.

eZSchema::setSchema ( $schemaDocument)

Reads the schema and builds the schema tree.

Referenced by setSchemaFromFile().

eZSchema::setSchemaFromFile (   $url)

Sets the schema from a text file or a URL.

eZSchema::validate (   $dom)

Validates the eZDOMDocument with the schema.

eZSchema::validateNode ( $domNode,
$schemaElement 
)
private

Validates a DOM node.

Referenced by validate().

Member Data Documentation

eZSchema::$Annotation = ""

Description or the schema.

eZSchema::$Elements = array()

Contains the schema elements, elements are indexed by their name.

eZSchema::$RootPrefix

Contains the schema root namespace prefix.

eZSchema::$ValidationRoot = false

Contains the validation root.

Referenced by validate().


The documentation for this class was generated from the following file: