|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--mozile.rng.Schema
Defined in rng.js
Constructor Summary | |
mozile.rng.Schema
()
Represents a RelaxNG schema. |
Method Summary | |
Array
|
getNodes(<String> type, name)
Returns an array of nodes of the given type. |
String
|
getType()
Gets the element's localName. |
Document
|
load(<String> filepath, <Boolean> forceLoad)
Loads an external RNG XML file, adds it to the documents array, and returns it. |
mozile.rng.Validation
|
parse(target)
Parses a RNG into a hierarchy of RNG nodes. |
mozile.rng.Node
|
parseElement(<Element> element, <mozile.rng.Validation> validation, <Boolean> omitValidation)
Parses an RNG element into an mozile.rng.Node. |
String
|
toString()
Returns "[object mozile.rng.Schema]". |
Boolean
|
validate(<Element> element)
Validates an element against the schema. |
Constructor Detail |
mozile.rng.Schema()
A schema has a single "root" element, and can include zero or more document objects representing external RNG files.
target
- Optional. An element or path to a file, which will be parsed.
Method Detail |
Array getNodes(<String> type, name)
type
- A node type, such as "element" or "zeroOrMore".
String getType()
Document load(<String> filepath, <Boolean> forceLoad)
filepath
- The path to the RNG XML file.
forceLoad
- Optional. When true the method will not check for a cached copy of the document.
mozile.rng.Validation parse(target)
target
- Optional. A XML string, path to a file, or element to parse.
mozile.rng.Node parseElement(<Element> element, <mozile.rng.Validation> validation, <Boolean> omitValidation)
element
- The RNG element to parse.
validation
- The validation object for this validation operation.
omitValidation
- Optional. When true the element will not be self-validated.
String toString()
Boolean validate(<Element> element)
element
- Optional. The element to validate. If not is given, th e documentElement is used.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |