WepsTable.dtd
WEPS Table XML Definition
Document Status : DRAFT
Author : Joseph Levin
Description: Defines the WepsTable xml "standard".
Document History
Thursday, June 22, 2006
- Added a parent attribute to column, so I can enable column inheritence.
- Add a columnstyles element under table to contain the columns which may be inherited by other tables. This allows us to avoid inheriting column structure.
- Moved the format attribute out of displayunits and made it it's own element under data. This allows us to extend the format for strings or dates.
Wednesday, June 21, 2006
- Backtracked and put columngroup back in. They make the organization of a table easier to understand.
- Added lists of avaliable options for elements into the comments.
- Expanded the border element to include sides and color.
- Defined the column element and its children.
Tuesday, June 20, 2006
Column group has been removed. The columns tag now serves as a grouping element.
- The cellstyle element has been shortended to style.
- Updated the label elements.
Root element of a WEPSTable.
|
<table>'s attributes |
|
Name | Values | Default |
|
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 |
|
Name | Cardinality |
|
style | Any 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 |
|
Name | Cardinality |
|
column | Any number |
|
Element's model :(column*)
The columns elements contains the columns.
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.
Defines the label for a column or columns grouping element.
<label>'s children |
|
Name | Cardinality |
|
image | One or none |
style | One or none |
text | One or none |
| |
Element's model :(text?, image?, style?)
Text data.
File name of an image.
<image>'s attributes |
|
Name | Values | Default |
|
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.
CellStyle Element
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
Specifies the border style of the cells.
Avaliable Border Styles
- ETCHED_IN
- ETCHED_OUT
- FRAME_IN
- FRAME_OUT
- IN
- OUT
- PLAIN
- THIN
- NONE
Boolean, set to true to display a left border.
Possible values : true, false
Boolean, set to true to display a right border.
Possible values : true, false
Boolean, set to true to display a top border.
Possible values : true, false
Boolean, set to true to display a bottom border.
Possible values : true, false
Boolean, set to true to display a boder on all sides.
Possible values : true, false
Boolean, set to true to not display a border.
Possible values : true, false
Border color of the cell. The value should be a hex code preceded with a # symbol.
Specifies the font for the cells. The value should be the name of the font.
<font>'s attributes |
|
Name | Values | Default |
|
bold | true, false | | italic | true, false | | size | | |
|
Point size for the 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
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>
Unique id for the cell style. This allows cell styles or columns to extend the cell style.
Possible values : Match the ID rules.
Id of a cell style to extend. #cells or #labels will extend the default JCTable styles.
Possible values : Match the IDREF rules.
Columngroups allow for column spanning in the header of a WepsTable.
Element's model :(label*, (columngroup | column)+)
Column Element
|
<column>'s attributes |
|
Name | Values | Default |
|
id | Match the ID rules. | | parent | Match the IDREF rules. | |
|
Element's model :(label*, action*, data?, style?, width?)
Unique id for the column. This allows the column to be referenced.
Possible values : Match the ID rules.
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 code to return when an event is fired on the column. More than one action may be added to a column.
<action>'s attributes |
|
Name | Values | Default |
|
type | | |
|
The type of action to respond to.
Avaliable Actions
Container element for the details of the data contained in the column.
|
<data>'s attributes |
|
Name | Values | Default |
|
type | | |
|
Element's model :(key?, value?, units?, displayunits*, adjust*, limit*, list?, format*)
The type of data this column contains.
Avaliable Data Types
- TEXT
- MULTILINE
- NUMERIC
- BOOLEAN
- LIST
- IMAGE
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.
Static value.
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.
The measurement unit system.
Possible Measurement Unit Systems
Format mask to apply when displaying the data.
format Format mask to apply when displaying the data. NOTE: Only applies to NUMERIC columns.
<format>'s attributes |
|
Name | Values | Default |
|
system | | |
|
The measurement unit system.
Possible Measurement Unit Systems
Adjustment to apply to the data. You may add more than one adjustment. NOTE: Only applies to NUMERIC columns.
<adjust>'s attributes |
|
Name | Values | Default |
|
operation | | |
|
@operation |
Attribute of adjust
|
The operation to use when applying the adjustment value.
Avaliable Operations
- ADD
- SUBTRACT
- MULTIPLY
- DIVIDE
Limit to apply when displaying the data. More than one limit may be applied. NOTE: Only applies to NUMERIC columns.
The measurement unit system.
Possible Limit Types
@inclusive |
Attribute of limit
|
Boolean indicating if the bound is inclusive.
Possible values : true, false
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
Defines the text to display for a given value. NOTE: Only applies to LIST columns.
<list>'s children |
|
Name | Cardinality |
|
listitem | Any number |
|
Element's model :(listitem*)
Sorry, no documentation.
<listitem>'s attributes |
|
Name | Values | Default |
|
value | | |
|
The value to associate the listitem with.
Required
Width element
<width>'s attributes |
|
Name | Values | Default |
|
max | | | min | | |
|
The minimum width allowed.
The maximum width allowed.