|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--mozile.rng.Validation
Defined in rng.js
Field Summary | |
Object |
_currentElement
|
Object |
_currentParent
|
Object |
_lastValidElement
|
Object |
_messages
|
Object |
_validAttributes
|
Object |
allowText
|
Object |
isEmpty
|
Object |
isValid
|
Constructor Summary | |
mozile.rng.Validation
()
Represents the result of validating an element. |
Method Summary | |
Attr
|
addAttribute(<Attr> attr)
Adds an attribute to the list of valid attributes. |
Void
|
append(<mozile.rng.Validation> validation, <Boolean> status)
Appends the messages from the given mozile.rng.Validation to this object's message list. |
mozile.rng.Validation
|
branch()
Creates a new Validation object, and copies some of the properties of the current object to the new object. |
Element
|
getCurrentElement()
Gets the last valid element. |
Element
|
getCurrentParent()
Gets the current parent element. |
Object
|
getFirstError()
Returns the first error message. |
String
|
getType()
Gets the object's type. |
Boolean
|
isAttributeValid(<Attr> attr)
Determines whether an attribute is on the validAttributes list. |
Void
|
logError(rngNode, <Node> node, <String> message)
Logs a parsing error message object to the messae array, and sets isValid to false. |
Void
|
logMessage(rngNode, <Node> node, <String> message, <String> type)
Logs a message object to the messae array. |
Void
|
merge(<mozile.rng.Validation> validation)
Appends messages and then merges validAttributes lists from the given mozile.rng.Validation object with this object. |
String
|
report(<Boolean> errorsOnly)
Prints a report of the validation operation. |
Element
|
setCurrentElement(element)
Sets the element to be validated and marks the last element as validated. |
Element
|
setCurrentParent(element)
Sets the current parent element. |
String
|
toString()
Returns "[object mozile.rng.Validation]". |
Field Detail |
Object _currentElement
Object _currentParent
Object _lastValidElement
Object _messages
Object _validAttributes
Object allowText
Object isEmpty
Object isValid
Constructor Detail |
mozile.rng.Validation()
This object is used to pass inforamtion down the RNG element hierarchy to an element which is validating its children. It stores information about the validity of the child, as well as: the last validated node, the attributes which have been validated, and whether text is allowed in this element.
Method Detail |
Attr addAttribute(<Attr> attr)
attr
- Th attribute node to be added.
Void append(<mozile.rng.Validation> validation, <Boolean> status)
validation
- The node which is logging the message.
status
- Optional. THis parameter overrides the object's "isValid" property.
mozile.rng.Validation branch()
Element getCurrentElement()
Element getCurrentParent()
Object getFirstError()
String getType()
Boolean isAttributeValid(<Attr> attr)
attr
- The attribute to check.
Void logError(rngNode, <Node> node, <String> message)
node
- The current node being validated.
message
- The message to log.
RNG
- node The node which is logging the message.
Void logMessage(rngNode, <Node> node, <String> message, <String> type)
node
- The current node being validated.
message
- The message to log.
type
- Optional. The message type.
RNG
- node The node which is logging the message.
Void merge(<mozile.rng.Validation> validation)
validation
- The node which is logging the message.
String report(<Boolean> errorsOnly)
errorsOnly
- Optional. When true, only errors will be reported.
Element setCurrentElement(element)
Element setCurrentParent(element)
String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |