Libraries.Data.Formats.DocumentTypeDefinitionAttribute Documentation
The DocumentTypeDefinitionAttribute class represents an attribute that has been parsed from a document type definition.
Example Code
use Libraries.System.File
use Libraries.Data.Formats
// DTD Attribute example: <!ATTLIST person name CDATA #REQUIRED>
DocumentTypeDefinitionAttribute MyDTDAttribute
MyDTD
Inherits from: Libraries.Language.Object
Actions Documentation
Compare(Libraries.Language.Object object)
This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.
Parameters
- Libraries.Language.Object: The object to compare to.
Return
integer: The Compare result, Smaller, Equal, or Larger.
Example
Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)
Equals(Libraries.Language.Object object)
This action determines if two objects are equal based on their hash code values.
Parameters
- Libraries.Language.Object: The to be compared.
Return
boolean: True if the hash codes are equal and false if they are not equal.
Example
use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)
GetAttributeName()
This action gets the attribute name.
Return
text: The value of the attribute name.
Example
use Libraries.Data.Formats
DocumentTypeDefinitionAttribute MyDTDAttribute
MyDTD
GetElementName()
This action gets the element name.
Return
text: The value of the element name.
Example
use Libraries.Data.Formats
DocumentTypeDefinitionAttribute MyDTDAttribute
MyDTD
GetEnumeratedValues()
This action gets the array of enumerated values.
Return
Libraries.Containers.Array: The array of enumerated values.
Example
use Libraries.Data.Formats
DocumentTypeDefinitionAttribute MyDTDAttribute
boolean success = MyDTD
GetHashCode()
This action gets the hash code for an object.
Return
integer: The integer hash code of the object.
Example
Object o
integer hash = o:GetHashCode()
GetType()
This action gets the attribute type.
Return
text: The value of the attribute type.
Example
use Libraries.Data.Formats
DocumentTypeDefinitionAttribute MyDTDAttribute
if MyDTD
GetValue()
This action gets the attribute value.
Return
text: The value of the attribute type.
Example
use Libraries.Data.Formats
DocumentTypeDefinitionAttribute MyDTDAttribute
MyDTD
HasEnumeratedValues()
This action determines if there are enumerated values for this attribute.
Return
boolean: True if there are enumerated values stored, false otherwise.
Example
use Libraries.Data.Formats
DocumentTypeDefinitionAttribute MyDTDAttribute
boolean success = MyDTD
IsFixedValue()
This action determines if the value of the attribute is fixed.
Return
boolean: True if the value of the attribute is fixed and false if it is not.
Example
use Libraries.Data.Formats
text quote
DocumentTypeDefinitionAttribute MyDTDAttribute
MyDTD
IsImpliedValue()
This action determines if the value of the attribute is implied.
Return
boolean: True if the value of the attribute is implied and false if it is not.
Example
use Libraries.Data.Formats
DocumentTypeDefinitionAttribute MyDTDAttribute
MyDTD
IsRequiredValue()
This action determines if the value of the attribute is required.
Return
boolean: True if the value of the attribute is required and false if it is not.
Example
use Libraries.Data.Formats
DocumentTypeDefinitionAttribute MyDTDAttribute
MyDTD
SetAttributeName(text name)
This action sets the attribute name to the given text value.
Parameters
- text name: The value to set the attribute name to.
Example
use Libraries.Data.Formats
DocumentTypeDefinitionAttribute MyDTDAttribute
MyDTD
SetElementName(text name)
This action sets the element name to the given text value.
Parameters
- text name: The value to set the element name to.
Example
use Libraries.Data.Formats
DocumentTypeDefinitionAttribute MyDTDAttribute
MyDTD
SetType(text type)
This action sets the attribute type to the given text value as long as it is a valid option. Attribute types can be one of the following: CDATA, ID, IDREF, IDREFS, NMTOKEN, NMTOKENS, ENTITY, ENTITIES, NOTATION, or a formatted enumerated list, e.g. (en1|en2|..).
Parameters
- text type: The value to set the attribute type to.
Return
boolean: True if the parameter was a valid type, false otherwise.
Example
use Libraries.Data.Formats
DocumentTypeDefinitionAttribute MyDTDAttribute
boolean success = MyDTD
SetValue(text value)
This action sets the attribute valeu to the given text value . It will also check to see if the value is required, implied, or fixed.
Parameters
- text value
Example
use Libraries.Data.Formats
DocumentTypeDefinitionAttribute MyDTDAttribute
MyDTD
On this page
Variables TableAction Documentation- Compare(Libraries.Language.Object object)
- Equals(Libraries.Language.Object object)
- GetAttributeName()
- GetElementName()
- GetEnumeratedValues()
- GetHashCode()
- GetType()
- GetValue()
- HasEnumeratedValues()
- IsFixedValue()
- IsImpliedValue()
- IsRequiredValue()
- SetAttributeName(text name)
- SetElementName(text name)
- SetType(text type)
- SetValue(text value)