Class: HTML
Description
This method defines schema attributes of the columns being returned. The formats currently supported are Boolean and Date. The data being sent to a client adds <! Attributes elementName attribute>.
Syntax
htmlObject.addAttrib(String label, String attributeList)
Parameters
label |
The XML label for which the attribute is being defined. |
attribute list |
A comma-separated list of elements. Valid attributes that can be applied to the elements are BOOLEAN and DATE. All other values will be discarded and replaced with CDATA. |
Returns
An updated XML formatted string containing an XML ATTLIST.
When Became Available
v6.4
Example
type HTML xx=Class.new(“HTML”)
set return=xx.addTitle(“MRPC98”)
set return=xx.addElement(“RECORD”,“DEP”)
set return=xx.addElement(“DEP”,“CID,IRN,BAL,MDT,SMET”)
set return=xx.addAttrib(“DEP”,“CID=,IRN=,BAL=,MDT=DATE,...
SMET=BOOLEAN”)
___________________________________________________________
The following is added by the methods listed above. The addAttrib is responsible for the lines starting with the line containing ATTLIST and ending with the line containing SMET.
<XML>
<! DOCTYPE MRPC98 [
<! ELEMENT RECORD (DEP)* >
<! ELEMENT DEP (CID,IRN,BAL,MDT)* >
<! ATTLIST DEP
CID CDATA>
IRN CDATA>
BAL CDATA>
MDT Format=Julian Start=1/1/1841>
SMET Format Boolean>
]>