OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [OASIS Issue Tracker] Commented: (OFFICE-1642) Editor Note:Section: 17.289 form:list-source



    [ http://tools.oasis-open.org/issues/browse/OFFICE-1642?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082#action_13082 ] 

Michael Brauer commented on OFFICE-1642:
----------------------------------------

Okay. Here is a revised proposal for both form:list-source an form:list-source-type:

form:list-source:

The form:list-source attribute specifies a source for the list entries  in a list or combo box.

Obtaining those list entries is a possibly multi-step  process. The details of this process depend on the value of the
form:list-source-type attribute.

If the  form:list-source-type attribute has the value |value-list|, then the content of the form:list-source attribute is ignored completely. See the form:list-source-type attribute for details.

In all other cases, the content of the form:list-source attribute is resolved relative to a database connection or database document. The <form:form> element containing the control defines this database connection or document by its form:datasource attribute.

For retrieving the the list entries depending on the form:list-source-type attribute, the
following algorithms are to be used:

If the form:list-source-type attribute has the value |table-fields|, then the form:list-source
attribute specifies the name of a database table. The names of
the columns of this table, in the order as returned by the database
driver, are used as list entries.

For all other values of form:list-source-type, the value of the form:list-source attribute is
used to create a result set. For this, the first step is to transform the value of the
form:list-source attribute into an SQL command as follows:

- |sql|, |sql-pass-through|
  The SQL command is the content of the form:list-source attribute.
- |query|
  The form:list-source attribute specifies the name of a query object in the
  database, whose underlying SQL command is to be used.
- |table|
  The form:list source attribute specifies the name of a database table, and the SQL
  command is the default SQL command to select all data from that
  table.
Basically, this is "SELECT * FROM <table_name>", but the
implementation might find it necessary to add quoting characters to
the table name, if advised by the database driver.

In a next step, the obtained SQL command is executed against the
database. If the form:list-source-type attribute has the value |sql-pass-through| or
|query|, and if the db:escape-processing attribute of the referred query
has the value |false|, then the SQL must be passed directly to the database
driver, without being interpreted and possibly modified or normalized
by the application.

This execution produces a two-dimensional homogeneous result set,
whose first-column-values form the entry list to be used.


form:list-source-type:

The form:list-source-type attribute specifies how to populate the
entry list in a combo box or list box control.

The possible values of this attribute are |value-list|,
|table-fields|, |query|, |sql|, |sql-pass-through|, |table|.

In the case of |value-list|, the entry list is populated with values
specified by the form:value attributes of the <form:option> child
elements. This setting is only applicable to list boxes.

In all other cases, form:list-source is evaluated against the database
document or database connection defined by the <form:form> element
which the control belongs to. See the form:list-source attribute for
details of this evaluation.

> Editor Note: Section: 17.289 form:list-source
> ---------------------------------------------
>
>                 Key: OFFICE-1642
>                 URL: http://tools.oasis-open.org/issues/browse/OFFICE-1642
>             Project: OASIS Open Document Format for Office Applications (OpenDocument) TC
>          Issue Type: Bug
>    Affects Versions: ODF 1.2
>            Reporter: Robert Weir 
>            Assignee: Michael Brauer
>            Priority: Blocker
>             Fix For: ODF 1.2
>
>
> Transcribed from ODF_Revised_Editorial_Notes_27May2009.odt
> Original author: Patrick Durusau
> Section: 17.289 form:list-source
> Ed. Note Note the presumption of a data structure for the result set. What happens to subsequent columns? How does this interact with form:bound-column?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://tools.oasis-open.org/issues/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]