Class mozile.rng.Ref
Object
|
+--mozile.rng.Node
|
+--mozile.rng.Ref
- class
mozile.rng.Ref
- extends mozile.rng.Node
Defined in rng.js
Field Summary |
String |
getName
Gets the full name of the element. |
Constructor Summary |
mozile.rng.Ref
()
Represents an RNG "ref" element.
|
Methods inherited from class mozile.rng.Node |
toString, getType, getSchema, getGrammar, getParentNode, getParentElement, getNextSibling, getChildNodes, getChildNode, appendChild, removeChild, mustContain, mayContain, reset, resetAll, selfValidateAll
|
getName
String getName
Gets the full name of the element. Strips leading and trailing whitespace.
mozile.rng.Ref
mozile.rng.Ref()
Represents an RNG "ref" element.
Parameters:
element
- The RNG element to represent.
getDefinition
mozile.rng.Define getDefinition()
Gets the definition matching this reference. Caches values for faster lookup.
getDescendants
Array getDescendants(types, <Boolean> deep)
Gets an array of all the elements which descend from this node.
Parameters:
types
- The RNG element type(s) of search for. Can be a string or an array of strings. E.g. "element".
deep
- Optional. If the current node is an element and "deep" is true, then its children are included.
mayHave
Boolean mayHave(<String> type)
True if the type is "ref". Otherwise the definition is checked.
Parameters:
type
- The type to be matched.
mustHave
Boolean mustHave(<String> type)
True if the type is "ref". Otherwise the definition is checked.
Parameters:
type
- The type to be matched.
selfValidate
mozile.rng.Validation selfValidate(validation)
Validates this RNG object. Refs may not have children and they must have names.
validate
mozile.rng.Validation validate(<Node> node, <mozile.rng.Validation> validation)
Validates the node.
Checks that this reference has a definiton, and calls the definition's validation method.
Parameters:
node
- The node to be validated.
validation
- The mozile.rng.Validation object for this validation operation.
Documentation generated by
JSDoc on Wed Aug 23 18:45:51 2006