Class mozile.rng.Attribute
Object
|
+--mozile.rng.Node
|
+--mozile.rng.Attribute
- class
mozile.rng.Attribute
- extends mozile.rng.Node
Defined in rng.js
Field Summary |
String |
getLocalName
Gets the local part of the qualified name of the element. |
String |
getName
Gets the name of the element. |
String |
getPrefix
Gets the prefix part of the qualified name of the element. |
Methods inherited from class mozile.rng.Node |
toString, getType, getSchema, getGrammar, getParentNode, getParentElement, getNextSibling, getChildNodes, getChildNode, appendChild, removeChild, getDescendants, mustContain, mayContain, reset, resetAll, selfValidateAll
|
getLocalName
String getLocalName
Gets the local part of the qualified name of the element.
getName
String getName
Gets the name of the element. Strips leading and trailing whitespace.
getPrefix
String getPrefix
Gets the prefix part of the qualified name of the element.
mozile.rng.Attribute
mozile.rng.Attribute()
Represents an RNG "attribute" element.
Parameters:
element
- The RNG element to represent.
getNamespace
String getNamespace()
Gets the namespace for the element.
If the element has an "ns" attribute, that is returned.
If the element's name has a prefix, the namespace for that prefix is looked up and returned. The special case where the prefix is "xml" is ignored.
If no namespace is found, null is returned.
Specification
mayHave
Boolean mayHave(<String> type)
True if this is an attribute. False otherwise.
Parameters:
type
- The type to be matched.
mustHave
Boolean mustHave(<String> type)
True if this is an attribute. False otherwise.
Parameters:
type
- The type to be matched.
selfValidate
mozile.rng.Validation selfValidate(validation)
Validates this RNG object. Attributes don't need children.
validate
mozile.rng.Validation validate(<Node> node, <mozile.rng.Validation> validation)
Checks the node's parent for this attribute, and validates the attribute's value.
If this element has a namespace, then it looks for an attribute with that namespace and the localName.
Otherwise it looks for an attribute with localName.
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