WepsTable.dtd

WEPS Table XML Definition

Document Status : DRAFT

Author : Joseph Levin

Description: Defines the WepsTable xml "standard".

Document History

Thursday, June 22, 2006 Wednesday, June 21, 2006 Tuesday, June 20, 2006



<table> Root element

Root element of a WEPSTable.

<table>'s children
NameCardinality
cellstylesOne or none
columnlabeldisplayOne or none
columnsOne or none
columnstylesOne or none
defaultcellstyleOne or none
defaultlabelstyleOne or none
frozencolumnsOne or none
frozenrowsOne or none
rowlabeldisplayOne or none
<table>'s attributes
NameValuesDefault
parent
Element's model :

(cellstyles?, columnstyles?, columns?, frozenrows?, frozencolumns?, defaultcellstyle?, defaultlabelstyle?, rowlabeldisplay?, columnlabeldisplay?)


@parent Attribute of table

The file name of a table to extend.


<cellstyles> Child of table

The cellstyles element contains the styles referenced by the table.

<cellstyles>'s children
NameCardinality
styleAny number
Element's model :

(style*)


<columnstyles> Child of table

The columnstyle elements contains the columns which may be inherited by other tables or columns.

<columnstyles>'s children
NameCardinality
columnAny number
Element's model :

(column*)


<columns> Child of table

The columns elements contains the columns.

<columns>'s children
NameCardinality
columnAny number
columngroupAny number
Element's model :

((columngroup | column)+)


<frozenrows> Child of table

Number of rows to freeze in the table.


<frozencolumns> Child of table

Number of columns to freeze in the table.


<defaultcellstyle> Child of table

Id of the cellstyle to use as a default for data cells in the table.


<defaultlabelstyle> Child of table

Id of the cellstyle to use as a default for label cells in the table.


<rowlabeldisplay> Child of table

Boolean value indicates if the table should display labels for each row.


<columnlabeldisplay> Child of table

Boolean value indicates if the table should display labels for each column.


<label> Child of column,columngroup

Defines the label for a column or columns grouping element.

<label>'s children
NameCardinality
imageOne or none
styleOne or none
textOne or none
<label>'s attributes
NameValuesDefault
spancolumns
spanrows
Element's model :

(text?, image?, style?)


<text> Child of label

Text data.


<image> Child of label

File name of an image.

<image>'s attributes
NameValuesDefault
rotate

@rotate Attribute of image

Degress to rotate the image.


@spanrows Attribute of label

Override the default WepsTable spanning.


@spancolumns Attribute of label

Override the default WepsTable spanning.


<style> Child of label,column,cellstyles

CellStyle Element

<style>'s children
NameCardinality
backgroundAny number
borderOne or none
editableOne or none
editorOne or none
fontOne or none
foregroundAny number
horizontalalignmentOne or none
rendererOne or none
repeatbackgroundOne or none
repeatforegroundOne or none
traversableOne or none
verticalalignmentOne or none
Element's model :

(background*, foreground*, editable?, traversable?, horizontalalignment?, verticalalignment?, border?, font?, repeatbackground?, repeatforeground?, editor?, renderer?)


<background> Child of style

Background color of the cell. The value should be a hex code preceded with a # symbol. If the repeatbackground element is used then multiple background elements may be included.


<foreground> Child of style

Foreground color of the cell. The value should be a hex code preceded with a # symbol. If the repeatforeground element is used then multiple foreground elements may be included.


<traversable> Child of style

Boolean value indicating if the cells can be traversed.


<editable> Child of style

Boolean value indicating if the cells can be edited by the user


<horizontalalignment> Child of style

Specifies the horizontal alignment of the cells.

Avaliable Horizontal Alignments


<verticalalignment> Child of style

Specifies the vertical alignment of the cells.

Avaliable Vertical Alignments


<border> Child of style

Specifies the border style of the cells.

Avaliable Border Styles

<border>'s attributes
NameValuesDefault
alltrue, false
bottomtrue, false
color
lefttrue, false
nonetrue, false
righttrue, false
toptrue, false

@left Attribute of border

Boolean, set to true to display a left border.

Possible values : true, false


@right Attribute of border

Boolean, set to true to display a right border.

Possible values : true, false


@top Attribute of border

Boolean, set to true to display a top border.

Possible values : true, false


@bottom Attribute of border

Boolean, set to true to display a bottom border.

Possible values : true, false


@all Attribute of border

Boolean, set to true to display a boder on all sides.

Possible values : true, false


@none Attribute of border

Boolean, set to true to not display a border.

Possible values : true, false


@color Attribute of border

Border color of the cell. The value should be a hex code preceded with a # symbol.


<font> Child of style

Specifies the font for the cells. The value should be the name of the font.

<font>'s attributes
NameValuesDefault
boldtrue, false
italictrue, false
size

@size Attribute of font

Point size for the font.


@bold Attribute of font

Boolean, set to true if the font is bold.

Possible values : true, false


@italic Attribute of font

Boolean, set to true if the font is italic.

Possible values : true, false


<repeatbackground> Child of style

Specifies how to repeat the background colors of the table.

Avaliable Repeats


<repeatforeground> Child of style

Specifies how to repeat the foreground colors of the table.

Avaliable Repeats


<editor> Child of style

The editor element is intended to be a last resort when the WepsTable does not know how to present data to the user for editing. Include the full class path for the JCCellEditor.

Example :

<editor>com.klg.jclass.cell.editors.JCStringCellEditor</editor>


<renderer> Child of style

The renderer element is intended to be a last resort when the WepsTable does not know how to present data to the user.. Include the full class path for the JCCellRenderer.

Example :

<renderer>com.klg.jclass.cell.renderers.JCStringCellRenderer</renderer>


@id Attribute of cellstyle

Unique id for the cell style. This allows cell styles or columns to extend the cell style.

Possible values : Match the ID rules.


@parent Attribute of cellstyle

Id of a cell style to extend. #cells or #labels will extend the default JCTable styles.

Possible values : Match the IDREF rules.


<columngroup> Child of columns

Columngroups allow for column spanning in the header of a WepsTable.

<columngroup>'s children
NameCardinality
columnAny number
columngroupAny number
labelAny number
Element's model :

(label*, (columngroup | column)+)


<column> Child of columnstyles,columns,columngroup

Column Element

<column>'s children
NameCardinality
actionAny number
dataOne or none
labelAny number
styleOne or none
widthOne or none
<column>'s attributes
NameValuesDefault
idMatch the ID rules.
parentMatch the IDREF rules.
Element's model :

(label*, action*, data?, style?, width?)


@id Attribute of column

Unique id for the column. This allows the column to be referenced.

Possible values : Match the ID rules.


@parent Attribute of column

Id of a column to inherit from. This column may be a previously defined column, a column in the columnstyles collection or a column in the columnstyles collection of parent tables.

Possible values : Match the IDREF rules.


<action> Child of column

Action code to return when an event is fired on the column. More than one action may be added to a column.

<action>'s attributes
NameValuesDefault
type

@type Attribute of action

The type of action to respond to.

Avaliable Actions


<data> Child of column

Container element for the details of the data contained in the column.

<data>'s children
NameCardinality
adjustAny number
displayunitsAny number
formatAny number
keyOne or none
limitAny number
listOne or none
unitsOne or none
valueOne or none
<data>'s attributes
NameValuesDefault
type
Element's model :

(key?, value?, units?, displayunits*, adjust*, limit*, list?, format*)


@type Attribute of data

The type of data this column contains.

Avaliable Data Types


<key> Child of data

The key is a string used to link the column to the datasource. It should be the label of column in the datasource. If omitted then the column id is used as the key.


<value> Child of data

Static value.


<units> Child of data

Measurement units that the data is stored in. NOTE: Only applies to NUMERIC columns.


<displayunits> Child of data

Measurement units to display the data in for a given measurement system. NOTE: Only applies to NUMERIC columns.

<displayunits>'s attributes
NameValuesDefault
format
system

@system Attribute of displayunits

The measurement unit system.

Possible Measurement Unit Systems


@format Attribute of displayunits

Format mask to apply when displaying the data.


<format> Child of data

format Format mask to apply when displaying the data. NOTE: Only applies to NUMERIC columns.

<format>'s attributes
NameValuesDefault
system

@system Attribute of format

The measurement unit system.

Possible Measurement Unit Systems


<adjust> Child of data

Adjustment to apply to the data. You may add more than one adjustment. NOTE: Only applies to NUMERIC columns.

<adjust>'s attributes
NameValuesDefault
operation

@operation Attribute of adjust

The operation to use when applying the adjustment value.

Avaliable Operations


<limit> Child of data

Limit to apply when displaying the data. More than one limit may be applied. NOTE: Only applies to NUMERIC columns.

<limit>'s attributes
NameValuesDefault
allowzerotrue, false
inclusivetrue, false
text
type

@type Attribute of limit

The measurement unit system.

Possible Limit Types


@inclusive Attribute of limit

Boolean indicating if the bound is inclusive.

Possible values : true, false


@text Attribute of limit

String to display if the data is outside the limit. If omitted then a string is created using the limit type, inclusivity and the boundry value.


@allowzero Attribute of limit

Boolean indicating if 0 will be displayed even if it is outside the limit boundry. Default is true.

Possible values : true, false


<list> Child of data

Defines the text to display for a given value. NOTE: Only applies to LIST columns.

<list>'s children
NameCardinality
listitemAny number
Element's model :

(listitem*)


<listitem> Child of list

Sorry, no documentation.

<listitem>'s attributes
NameValuesDefault
value

@value Attribute of listitem

The value to associate the listitem with.

Required


<width> Child of column

Width element

<width>'s attributes
NameValuesDefault
max
min

@min Attribute of width

The minimum width allowed.


@max Attribute of width

The maximum width allowed.