Differences in format - lexicon app created from XHTML

I’m trying to build some dictionary apps using the XHTML output from FLEx, as we have some very specific format requirements. My understanding is that whatever dictionary configuration format you build in FLEx should be represented in the XHTML output, and also in the data format in the app.

What we have set up in the dictionary configuration is shown with this image:
image

If we export to XHTML and open the XHTML file in a browser, we get this on the screen:
image

So far so good. But then when I load the XHTML into a DAB app, this is what I get:

That’s pretty close. But ignoring the font differences (which I can adjust as desired in the app configuration), there are still a few differences. The /A around “de l’arabe” to make a new line isn’t being used. And the “sens:” section is indented (and isn’t in the XHTML), and “variante:” shold be indented farther than “sens:”.

Is there something that I can do to make the output look closer to what it should, or am I coming across bugs that need to be fixed?

And one more thing… The “avec verbe auxiliare:” is not in italics. This is a style which is defined in the ProjectDictionaryOverrides.css file, as follows:

.entry> .auxiliare> span:first-child:before{
		content:'\A avec verbe auxiliaire: ';
		font-style:italic;
	}

Can someone confirm that the overrides are indeed taken into account in the DAB import?

Can you share your project with me? XHTML in DAB does do some things different to what the CSS says.

I’ve sent you a link, Ian. Looking closer, my guess is that the ProjectDictionaryOverrides.css file is NOT taken into account, because it isn’t even copied into the “lexicon” folder in the DAB project folder.

For the avec verbe auxiliaire look in the Imported Styles tab for:
.entry> .auxiliare> span:first-child:before
Modify that style so font-style: italic

For the de l’arabe if you add a style in Modifications tab:
Style Name .etymologies
And in the CSS put:

.etymologies {
    display: block;
    padding-left: 14px;

}

You may need to adjust the padding-left to that style too.

I appreciate your willingness to look into this, Ian. And I certainly can play around with the styles to make things look more like I need them to look. But that begs the question: Why is the output from DAB different than the format within FLEx? I can understand if the overrides are not handled that there would be some differences. (That should be considered a bug, by the way…) But this block stuff that you are suggesting that I need to do - that should be handled automatically by DAB, should it not? Both are using HTML and CSS to display the entry, so can’t we make it so that there is a seamless transition between the dictionary format in FLEx and the entry layout produced by DAB, so they are the same? It seems like that should be what we want to shoot for.

I have been bothered by this same issue, the fact that DAB does not reproduce exactly what I have configured in FLEx and would see this as something to get fixed urgently in DAB. Is this really difficult to implement?
I greatly appreciate what you are doing and have enjoyed making dictionary apps with DAB.
Robert

1 Like

Similarly for the POS info:
Add Style
.sharedgrammaticalinfo
And in the CSS:

.sharedgrammaticalinfo {
    padding-left: 14px;
}

Also add:
.lexsensereferences
And in the CSS:

.lexsensereferences {
    padding-left: 21px;
}

I will look at the other CSS files and see why they are not being included. As a work around you could combine all CSS files into the one that is included. But I think you will need to start a new project.

I have now figured out how to inlcude images in this tool.
Here is what the configured view looks in FLEx (several entries) and below how the chɔŋ entry is displayed in DAB.



My problem is that I have no idea why this should be such a discrepancy, nor what I need to do to get the same result in the dictionary app. Is this a bug? Or do I need to learn more about how to create apps.

You are asking why is the XHTML representation in DAB different?

Flex follows a traditional presentation model in their XHTML output = Print model: use abbreviations, minimize white space and save paper.

Digital dictionaries are not bound to that traditional (print) model. Why preserve the limitations of a print dictionary on a digital dictionary? What is more important the information or the preservation of print centric formatting? Who is the target audience, the lexicographer or the people group?

You have to learn to read a dictionary, (what does v. mean) so if we can eliminate abbreviations and spread out the information, it may be easier to learn to read and find the information you want.

Print dictionaries have space limitations. Digital dictionaries don’t. Let’s not take an excellent model for one form (print) and assume it is an excellent model for another form (digital).

Yes DAB output is different to the look in Flex. I hope you can understand why that is. Maybe we should ask why Flex can’t output a more digital format?

I’m finally getting around to playing with this again. Your suggestions were very helpful, and I was able to do a number of changes on my own. But I’m having some difficulty with a couple of things:

image001.jpg

  1.  I don’t know why the POS (verbe nominal) is indented a bit – I thought there was space as content, but removing that didn’t fix the problem.
    
  2.  The “voir aussi:” should be under the a), as it is part of the sense.
    
  3.  I can’t figure out why the example in quotes is going onto a new line after the “example:” tag.
    

Any thoughts about those things?

You are in XHTML.

  1. In many/most models the POS is part of the sense not part of the initial information. I think the indentation is set for that placement.

  2. Are you saying the “voir aussi:” section should be higher up, it is under the a) section, so I am not sure I follow what you want.

  3. My guess is that the French double quotes are fixed to the preceding word with a non-breaking space. Thus making the word too long for the space.

I’m sorry I am continuing an old discussion. I have been using DAB for only about a month now, and studying the old discussions to try to find solutions to my problems. I have a similar problem to what jheath described when he wrote “Is there something that I can do to make the output look closer to what it should?” I am using XHTML input from FieldWorks into DAB, and trying to do all the formatting in FieldWorks. I have one FieldWorks configuration for print dictionaries and a different configuration for input into DAB. Ian McQuay, you responded in November 2019, “Yes DAB output is different to the look in Flex. I hope you can understand why that is. Maybe we should ask why Flex can’t output a more digital format?” Well, I believe FLEx can be configured for a more digital format, and that is what I have been trying to do. But it is frustrating when I try to configure my dictionary the way I would like it to appear as a dictionary app, and the program overrides my preferences without giving me any control. Ideally the program would allow users to configure and format their dictionaries in FieldWorks, output that as an XHTML file, and then the same thing would appear when DAB puts out an app. I have to add, though, that the index view is one good thing that DAB adds to the dictionary app. When I look at the XHTML output from FieldWorks, I am satisfied with the formatting, but the formatting is changed in the DAB program, and that seems to be beyond my control. If I knew how to understand and modify CSS files, I suppose that might help me get what I want, but I wish that sort of tweaking were not necessary.

As an illustration of what I was writing about, here is a view of an entry from our Kwéyol Dictionary as filtered through the DAB:


And here is a view of the same thing that I have modified using a paint program to look more like I would like it to appear:

The differences between the two just have to do with vertical and horizontal alignment. I might not be able to get just the appearance I want in the FieldWorks program, but that is the only place I can do the formatting the way I want. If I could work with and edit CSSes, I suppose I might be able to modify the format the way I want, but it seems that should not be necessary.

@linguafranka said: Maybe we should ask why Flex can’t output a more digital format?

I could not agree more. Too many people have their minds fixed on a Print layout and don’t understand why it can be different for digital.

I am impressed you got your XHTML output to be so spread out.

If Flex does not give you what you want, then some CSS tweaks can improve things sometimes. That would work for the Example sentence block to move the translation onto the next line.

However combining the opp: and syn: may require a block level element to surround them. That probably does not exist in Flex output. There are ways to treat each part as an inline-block, and hopefully the part before and after would exclude them rather than include them. I’d need to see the XHTML and the CSS to test.

Ian, when I wrote “Maybe we should ask why Flex can’t output a more digital format?”, I was quoting you.

Can you tell I have short term memory loss?

So for this Example in XHTML:

                            <span class="examplescontent">
                                <span class="example">
                                    <span lang="kne">Man-á ka si sin-as-áwa ay animál.</span>
                                </span>
                                <span class="translationcontents">
                                    <span class="translationcontent">
                                        <span class="translation">
                                            <span lang="en">Get pairs of animals.</span>
                                        </span>
                                    </span>
                                </span>
                            </span>

I’d add this Style modification:
image

By doing that we are converting that span element that is normally an inline element into a block element (paragraph like).

I don’t know how to do that modification you are showing me. Is that something I do within the DAB program, or outside the program, operating on the CSS file?

I think I am seeing how to do that within the DAB program, under Styles, and the Imported Styles tab.