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

Summary

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetAttributeName()This action gets the attribute name.
GetElementName()This action gets the element name.
GetEnumeratedValues()This action gets the array of enumerated values.
GetHashCode()This action gets the hash code for an object.
GetType()This action gets the attribute type.
GetValue()This action gets the attribute value.
HasEnumeratedValues()This action determines if there are enumerated values for this attribute.
IsFixedValue()This action determines if the value of the attribute is fixed.
IsImpliedValue()This action determines if the value of the attribute is implied.
IsRequiredValue()This action determines if the value of the attribute is required.
SetAttributeName(text name)This action sets the attribute name to the given text value.
SetElementName(text name)This action sets the element name to the given text value.
SetType(text type)This action sets the attribute type to the given text value as long as it is a valid option.
SetValue(text value)This action sets the attribute valeu to the given text value .

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.

Example Code

Object o
        Object t
        integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Example Code

use Libraries.Language.Object
        use Libraries.Language.Types.Text
        Object o
        Text t
        boolean result = o:Equals(t)

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

GetAttributeName()

This action gets the attribute name.

Example Code

use Libraries.Data.Formats
        DocumentTypeDefinitionAttribute MyDTDAttribute
        MyDTD

Return

text: The value of the attribute name.

GetElementName()

This action gets the element name.

Example Code

use Libraries.Data.Formats
        DocumentTypeDefinitionAttribute MyDTDAttribute
        MyDTD

Return

text: The value of the element name.

GetEnumeratedValues()

This action gets the array of enumerated values.

Example Code

use Libraries.Data.Formats
        DocumentTypeDefinitionAttribute MyDTDAttribute
        boolean success = MyDTD

Return

Libraries.Containers.Array: The array of enumerated values.

GetHashCode()

This action gets the hash code for an object.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

GetType()

This action gets the attribute type.

Example Code

use Libraries.Data.Formats
        DocumentTypeDefinitionAttribute MyDTDAttribute
        if MyDTD

Return

text: The value of the attribute type.

GetValue()

This action gets the attribute value.

Example Code

use Libraries.Data.Formats
        DocumentTypeDefinitionAttribute MyDTDAttribute
        MyDTD

Return

text: The value of the attribute type.

HasEnumeratedValues()

This action determines if there are enumerated values for this attribute.

Example Code

use Libraries.Data.Formats
        DocumentTypeDefinitionAttribute MyDTDAttribute
        boolean success = MyDTD

Return

boolean: True if there are enumerated values stored, false otherwise.

IsFixedValue()

This action determines if the value of the attribute is fixed.

Example Code

use Libraries.Data.Formats
        text quote
        DocumentTypeDefinitionAttribute MyDTDAttribute                   
        MyDTD

Return

boolean: True if the value of the attribute is fixed and false if it is not.

IsImpliedValue()

This action determines if the value of the attribute is implied.

Example Code

use Libraries.Data.Formats
        DocumentTypeDefinitionAttribute MyDTDAttribute                   
        MyDTD

Return

boolean: True if the value of the attribute is implied and false if it is not.

IsRequiredValue()

This action determines if the value of the attribute is required.

Example Code

use Libraries.Data.Formats
        DocumentTypeDefinitionAttribute MyDTDAttribute                   
        MyDTD

Return

boolean: True if the value of the attribute is required and false if it is not.

SetAttributeName(text name)

This action sets the attribute name to the given text value.

Example Code

use Libraries.Data.Formats
        DocumentTypeDefinitionAttribute MyDTDAttribute
        MyDTD

Parameters

SetElementName(text name)

This action sets the element name to the given text value.

Example Code

use Libraries.Data.Formats
        DocumentTypeDefinitionAttribute MyDTDAttribute
        MyDTD

Parameters

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|..).

Example Code

use Libraries.Data.Formats
        DocumentTypeDefinitionAttribute MyDTDAttribute
        boolean success = MyDTD

Parameters

Return

boolean: True if the parameter was a valid type, false otherwise.

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.

Example Code

use Libraries.Data.Formats
        DocumentTypeDefinitionAttribute MyDTDAttribute
        MyDTD

Parameters