Scott Starker wrote:
> 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&eacute;</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;
> }
> 

--> You are asking too much from XMLmind XML Editor. What's the point of
controlling the width of the cells while you are creating/editing them?
What's the point of wrapping table rows?

When you are using XMLmind XML Editor, you are using an *authoring*
*tool*. What you see in the authoring tool may look vastly different
from the HTML, PDF, whatever, which will be generated out of the source
XML documents.

This is one of the reasons we have developped XMLmind XML Editor. When
we use it to author documents, we really, really, don't care about how
these documents will look in HTML, PDF, etc. We try to concentrate on
the contents. And for that, we needed to get rid of visible tags
(because we find them highly distracting). No less, no more.



--> In your case, the only way to control the width of table columns is
to add a "width" CSS attribute (e.g. "width:10ex;") to one or more of
the cells of this column. The "width" CSS attribute is understood as
being a minimum width. I mean, the table cell will be larger than this
if needed to.

Your CSS file for XXE has many errors and inconsistencies. Please find
attached to this email a correct one and a screen shot of what I get
with it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.css
Type: text/css
Size: 513 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20061031/96693b20/attachment.css
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.xml
Type: text/xml
Size: 866 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20061031/96693b20/attachment.xml
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: example.png
Type: image/png
Size: 2463 bytes
Desc: not available
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20061031/96693b20/attachment.png
 

Reply via email to