[daisy] [JIRA] Commented: (DSY-88) Field value labels for styling
Olivier Lange (JIRA)
issues at cocoondev.org
Thu Jun 5 19:55:27 CEST 2008
[ http://issues.cocoondev.org//browse/DSY-88?page=comments#action_13646 ]
Olivier Lange commented on DSY-88:
----------------------------------
Karel, do you mean the query results already contain a 'valueFormatted' attribute?
For me, it seems it doesn't work. I tried to query the repository (HTTP API) on fields having labels, on a Daisy 1.5.1 instance and another Daisy 2.2. In both cases, I get no 'valueFormatted' attribute as a result.
For instance:
select id, name, $tbSparte, $tbProjektart, $tbLands ...
where $tbSparte, $tbProjektart are single valued string fields with labels, and $tbLands is a multivalued string field with labels, this is what I get:
<d:row documentId="1239-PA" branchId="1" languageId="1" access="read,fullRead,write,publish,delete">
<d:value>1239-PA</d:value>
<d:value>«Diesseits vom Jenseits – Jenseits von Diesseits» Der «Dia de los Muertos» im Spiegel [...]</d:value>
<d:value>2.TB05</d:value>
<d:value>SMP.TB06</d:value>
<d:multiValue>
<d:value>MX.TB06</d:value>
<d:value>CHDE.TB06</d:value>
</d:multiValue>
</d:row>
There are formattedValue attributes with the labels, only the 'raw' field value as a text() node.
> Field value labels for styling
> ------------------------------
>
> Key: DSY-88
> URL: http://issues.cocoondev.org//browse/DSY-88
> Project: Daisy
> Type: Improvement
> Versions: 1.0
> Reporter: Olivier Lange
> Priority: Minor
> Fix For: 1.1
>
> To style a document having specific fields, we need to display the label of the field value (defined in the field selection list), rather than the formatted value.
> We need the localized labels in the XML input, which are missing for now, the XML input provides only the field value.
> For instance, for a CourseProfessor field, the input XML may look like that:
> <ns:field xmlns:ns="http://outerx.org/daisy/1.0" typeid="2"
> valueformatted="hgenberg" label="Professor" name="CourseProfessor">
> <ns:string>hgenberg</ns:string>
> </ns:field>
> (there's just the value, no label.)
> The field definition is as follows:
> Name: CourseProfessor
> Label: Professor
> Type: STRING
> Selection value list (value, default label) =
> [
> ( "hgenberg", "Prof. H. Genberg"),
> ( "jdoe, "Prof. J. Doe"),
> ...
> ]
> Bruno suggested the following implementation:
> * add a SelectionList.getLabel(value) method
> * adjust PublisherImpl.annotateFields to take that label
> if the fieldtype has a selection list defined.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the daisy
mailing list