Three children of office:database list what a Base document holds besides the connection:
db:queries, db:forms and db:reports. The data source and the table
representations are on the Database description page. Types are the
OpenDocument 1.3 schema’s.
Queries
db:queries holds any number of db:query and db:query-collection (a folder
of queries; collections nest).
| Element | Attribute or child | Value |
|---|---|---|
db:query | db:name | Required string. |
db:command | Required string: the SQL text. | |
db:escape-processing | Optional boolean: whether the SQL has the {…} escape syntax to be translated for the driver. | |
db:title, db:description | Optional strings. | |
db:style-name | Optional: a table-column style. | |
db:default-row-style-name | Optional: a table-row style. | |
db:order-statement | Optional child: db:command (required string, an ORDER BY expression) and db:apply-command (optional boolean). | |
db:filter-statement | Optional child: db:command (required string, a WHERE expression) and db:apply-command (optional boolean). | |
db:columns and db:update-table | Optional children: the result’s column layout (db:column, as for a table representation) and the table that edits write to (db:name required, db:catalog-name and db:schema-name optional). | |
db:query-collection | db:name, db:title, db:description | Name (required), title and description (optional strings). |
| children | Any number of db:query and db:query-collection. |
The explorer lists each query with its folder, SQL, ordering, filter, update table and columns, in the Queries table.
Forms and reports
db:forms and db:reports each hold any number of db:component and
db:component-collection.
| Element | Attribute or child | Value |
|---|---|---|
db:component | db:name | Required string. |
db:title, db:description | Optional strings. | |
xlink:type | Optional, simple; with xlink:href. | |
xlink:href | The address of the embedded document inside the package: a folder such as forms/Obj1 or reports/Obj2 (or ./forms/Obj1). | |
xlink:show | Optional, none. | |
xlink:actuate | Optional, onRequest. | |
db:as-template | Optional boolean: the document is opened as a template (a new, unsaved copy) rather than itself. | |
| child | Optional, one office:document or math:math: a flat copy of the document written inside the element instead of a link (the schema allows either). | |
db:component-collection | db:name, db:title, db:description | Name (required), title and description (optional). |
| children | Any number of db:component and db:component-collection. |
The embedded documents are ordinary OpenDocument documents in the package: the folder named by
xlink:href holds a content.xml (and its own styles.xml, meta.xml
and pictures where it has them), and the manifest lists the folder with the document’s media type. A form is a text
document whose body has the office:forms controls bound to a table or query. A report written with the
Report Builder uses the rpt: namespace (http://openoffice.org/2005/report), which the
explorer’s name check knows as a LibreOffice namespace. The explorer’s Forms and reports table gives each
component’s folder, title, document address, template flag and how many parts the package holds under that
folder; no such folder in the package means the address points at nothing.
Not described
This page follows the OpenDocument 1.3 RELAX NG schema for the three lists and the structure LibreOffice’s test documents show.
Known, not yet covered
- Reference: the elements of the report definition (
rpt:) documents that the Report Builder writes: they are LibreOffice’s own and have no page here. - Viewer: forms and reports are shown as embedded parts, not drawn as forms or reports.
Unknown
- Reference: the media type the manifest gives a report folder in each LibreOffice version: no sample read holds a report.