My "scripts" for the interlineariztion works perfectly (thanks to Hussein!) but
there are two "embellishments" to really make it look nice and it's the
"embellishments" are what I want to get a handle on.
1) How do I get the left/right margins of the elements of the xxe when I don't
even know the number of the number of elements to begin?
2) How do I wrap the elements for the xxe/css?
Let me now explain the first one. I think I'll need an example for this.
This is the transformation from the xml to html (this works fine).
Here is the <style> (this works fine):
<style type="text/css">
div.words { float: left; margin-right: .75em; margin-bottom: .6em; }
p.nowraplangData { white-space: nowrap; margin: 0px; }
.langData { color: navy; font-size: larger; font-weight: bold; }
p.nowrapgloss { white-space: nowrap; margin: 0px; margin-top: .1em; }
.gloss { color: green; font-size: smaller; font-style: italic; font-family:
sans-serif; }
.free { color: brown; clear: both; margin-top: .4em; margin-bottom: 2em; }
...
</style>
The html code looks like this (this works fine):
<table cellpadding="0" cellspacing="0" width="80%" align="center">
<tr valign="top">
<td width="5%">
<div class="num">001</div>
</td>
<td width="95%">
<div class="words">
<p class="nowraplangData"><span class="langData">Ya</span></p>
<p class="nowrapgloss"><span class="gloss">already</span></p>
</div>
<div class="words">
<p class="nowraplangData"><span class="langData">wejkawitl</span></p>
<p class="nowrapgloss"><span class="gloss">long.ago</span></p>
</div>
<div class="words">
<p class="nowraplangData"><span class="langData">in</span></p>
<p class="nowrapgloss"><span class="gloss">in</span></p>
</div>
<div class="words">
<p class="nowraplangData"><span class="langData">topueblo</span></p>
<p class="nowrapgloss"><span class="gloss">our.town</span></p>
</div>
<div class="words">
<p class="nowraplangData"><span class="langData">oyeka</span></p>
<p class="nowrapgloss"><span class="gloss">it/he/she.was</span></p>
</div>
<div class="words">
<p class="nowraplangData"><span class="langData">oksé</span></p>
<p class="nowrapgloss"><span class="gloss">other</span></p>
</div>
<div class="words">
<p class="nowraplangData"><span class="langData">tlamantle.</span></p>
<p class="nowrapgloss"><span class="gloss">manner</span></p>
</div>
<div class="free">Long ago life in our town was very different.</div>
</td>
</tr>
</table>
Now, this is the xxe file running. With two "words" the screen width is 50%...
With three it's 33%... With four it's 25%... How do I get the width that's
shorter then this? I.e., how do I get the width a little bit more than the
longest "word"? And, for two second question, how do I get the to warp once the
"words" pass the right margin of the window instead on the same line?
This is the xml created by xxe (this works fine):
<example num="x">
<interlinearization>
<sentence>
<phrase>
<words>
<word>
<langData lang="l">Ya</langData>
</word>
<word>
<gloss lang="l">already</gloss>
</word>
</words>
<words>
<word>
<langData lang="l">wejkawitl</langData>
</word>
<word>
<gloss lang="l">long.ago</gloss>
</word>
</words>
<words>
<word>
<langData lang="l"></langData>
</word>
<word>
<gloss lang="l"></gloss>
</word>
</words>
</phrase>
</sentence>
<free>Long ago life in our town was very different.</free>
</interlinearization>
</example>
And this is a part of the xxe/css:
interlinearization
{
display:block;
left:example-indent();
}
interlinearization > sentence
{
display:table;
}
interlinearization > sentence > phrase
{
display:table-row;
}
interlinearization > sentence > phrase > words
{
white-space: nowrap;
}
interlinearization > sentence > phrase > words > word
{
}
words > word > langData:before
{
display:inline;
}
words > word > langData
{
margin: .1em 0em .1em 0em;
color:blue;
font-family: Arial Unicode MS, sans-serif;
}
words > word > gloss:before
{
display:inline;
}
words > word > gloss
{
margin: 0em .1em .1em 0em;
color:green;
font-family:sans-serif;
}
free:before
{
display: inline;
}
free
{
color:red;
}
Please forgive me for the length of this message.
Could someone tell me what I did wrong with the xxe/css or can you point me in
the right direction? Any help would be appreciated.
Scott
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20061030/8dbdab80/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 10216 bytes
Desc: not available
Url :
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20061030/8dbdab80/attachment.jpeg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 9091 bytes
Desc: not available
Url :
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20061030/8dbdab80/attachment-0001.jpeg