The following example is taken from src\org\dbforms\resources\dbforms-config.xsd
It has been changed here from schema style to DTD sytle for those more familiar with the latter. However, no DTD for dbforms.xml actually exists.
Table 13.1. Excerpts in DTD style of dbforms-config.xml
<!ELEMENT query (field*, search*)> | |
<!ATTLIST query | |
name CDATA #REQUIRED | Name of the table, same meaning as in table attribute |
from CDATA #IMPLIED | Name of the parent table. This table must be defined within dbforms-config.xml. If you leave out everything else, query is used as an updatable alias for the prior defined table! If missing, |
groupBy CDATA #IMPLIED | Group by clause for select |
where CDATA #IMPLIED | Starting where part of select |
followAfterWhere CDATA #IMPLIED | Must be OR or AND, will be appended to the starting where part if dbforms have build an own where part: Where + followAfterWhere + where_from_dbforms |
orderWithPos CDATA #IMPLIED | If true, the order part will build with fieldnumber instead of fieldname |
distinct CDATA #IMPLIED | If true, select will be build as select distinct |
> | |
<!ATTLIST field | |
name CDATA #REQUIRED | Name of field in table |
type CDATA #IMPLIED | Type of field |
autoInc CDATA #IMPLIED | stores if the field is AUTOINCremental |
key CDATA #IMPLIED | =TRUE if field is key field |
sortable CDATA #IMPLIED | all non-key-fields you want to be sortable should be declared sortable in the XML-config file |
expression CDATA #IMPLIED | Expression of field. Results in expression + AS + name |
> | |
<!ELEMENT search EMPTY> | All elements of type search can be used as normal fields in dbforms. While construction the sql statement these fields will not be included in the from part. They will only be used to generate the where part of the query. If the query has a groupBy statement, these fields will be used in the where part of the query if needed, not in the having part! |
<!ATTLIST search | |
name CDATA #REQUIRED | Name of field in table or alias |
expression CDATA #IMPLIED | Expression of field. Results in expression + AS + name |
> |