Customization of fields

Firstly, thank you for these wonderful apps! I’m particularly excited about the Dictionary App Builder and would really like to become more proficient at using it.

Is there any way to have more control over how the fields are presented in the app? I know that when you are in DAB, there is a "Fields’ tab which allows you to insert before and after text to some fields, but the central fields like Headword, Definition, Restrictions, Pronunciation, etc, are not included in that tab. Is there any way to have more control of the presentation of those fields?

I tried giving DAB info in both LIFT and xhtml, both generated by the same FLEx database, and the resulting apps had quite different formatting when it displayed the info. I really appreciate all your work, and am very excited to use this tool in our work.

XTHML output will give you the most flexible output. The main problem with the default XHTML is that it was designed for print not for screen. So there is a lot of work to make it easier to read like the LIFT output.

I sometime do LIFT manipulations to get more out of LIFT than the default, including a Semantic tab.

Thanks for the reply, Ian. So, in what way is the XHTML output more flexible?

When I tried the LIFT vs. the XHTML methods of giving DAB my FLEx data, it was the LIFT file that gave me access to my customized fields, my notes, relations, complex forms, and variants. It lets me put symbols before or after the field, give the field a label either above or next to the field, and reorder the field in regard to the senses. All this is really cool. But the XHTML method didn’t give me any of those possibilities.

But could I change the font style for those fields? Like, color or italic or something?

Also, it doesn’t give me access to those core fields: Headword, Definition, Restrictions, Examples and Example Translations.

I agree that the the same format for a printed dictionary wouldn’t necessarily be ideal of the screen, but I think that there may be some formatting strategies that are helpful in both. For example, having restrictions in a parenthetical directly after the definitions is an easy an non-confusing way to present the information. Having the restrictions on a separate line, labelled or not, confuses more people than it helps. Other printed dictionary strategies, such as the heavy usage of abbreviation, are less necessary in the app.

I suppose I’d just like to know what sort of tools I have in my belt for the presentation of the data.

Also, when you say you do “LIFT manipulations” does that mean you are just going into the the LIFT text document and manually adding a Semantic tab?

Again, thank you for all the work you’re putting into these tools.

XHTML from Flex allows you to configure what is output. If you have custom fields, then those by default will not be included in the XHTML. You would need to add them to the output. You can define the font color, size, bolding, whether block or inline, etc. You can configure the XHTML to display the trait information. I am not an expert on Flex configuring. I have done it enough to know I don’t like it very much, it is a little overwhelming, but I can get where I want to go eventually. I have not figured out a way to generate a semantic reversal yet so you could have a semantic tab for XHTML.

Traits in LIFT are not output in DAB. So I run an XSLT transformation that retains the semantic trait but adds the information in as a note and also as a reversal with a fake language. Then DAB will generate a semantic tab. So my manipulation is scripted. Manual is so error prone and overwhelming. It can generate both a number and a name index for the semantic information.

Yes you can over clutter a dictionary with extra words that are not in print dictionaries.

When you mention that FLEx doesn’t put custom fields in the output xhtml, and that I’ll need to add them to the output, how do you mean?

In FLEx you need to configure the appearance of the dictionary. Go to Tools: Configure: Dictionary. You may well want to go to “Manage Views” and create a version that you will use for DAB that is different to your usual dictionary preview in FLEx. Then you can tick (check) whatever fields you want to appear (including custom fields) and re-order them. You can change the styles used, font and font colours, though it is difficult to do that systematically. When you are happy with everything, make sure you have the correct view selected and export the dictionary as XHTML and use that in DAB.

Thanks for the reply, DavidW. I’m pretty familiar with the configuration tools inside FLEx, but those formatting configurations are not what is being displayed in my app, neither through the LIFT export or the xhtml export. But I’ve realized I need to get a better handle on the kind of control I have over the info display (both though DAB and FLEx). So I’m going to do more experimentation!

Configuration in Flex is not output in LIFT files. It is only included in exported XHTML files.

Just looking at Fieldworks again. It is still somewhat in the print age. It only allows some fields and groupings as paragraphs. So then to spread out the entries more you would have to edit the CSS file to add display:block to some of the span elements after exporting from Flex. No problem for someone with HTML/CSS experience but not easy for many.

Hi Ian, Could you post your XSLT that you mentioned above? Even if it is a draft, it could give some ideas and inspiration. Also could you give an example of where you would add display:block in the CSS, sort of a before and after of the surrounding elements?

If you are on Windows you can get it and the way I use it here at Github:
Download a install the release. Got to the Modify-lift project and edit the project.txt file for your input file and output file. And adjust the other parameters to suit you needs.

If you are on Linux then the XSLTs are here:
But look at the params that are set in the project.txt file as they are used as params in the XSLT.

So your command line would be like this but bash variables:

%java% -jar "%saxon%" -o:"%outfile%" "%infile%" "LIFT-show-semantic-domain-in-DAB.xslt" %params%

My windows method creates a project.xslt that has all the variables in it from the [variables] section and is included in the main transformation so I don’t have to write long list of parameters.

Sorry this sat in the reply but I forgot to post it.