Re: [CSS3] Box model: 'display' property - 'bypass' value addition

Stanimir Stamenkov wrote:
> 
> Lately I've faced such issue: I'm trying to express a so called 
> "tree-table" to visualize a file directory structure (in this example of 
> mine). First I define a list element with its items describing the files 
> in the top-level directory. An item could have another list as an 
> additional property, determining the item as a sub-directory item, and 
> so on.
> 
> Now, to have this list displayed as a linear table where the rows are 
> defined by every list element and the columns - by the element's 
> properties, I have to omit some of the data-structure markup, i.e. to be 
> able to instruct the style engine not to generate principal visual box 
> for some of the container elements so their content would be laid out in 
> / "shifted" / added to the content of the upper-level parent.

By 'shifted', I assume you mean shifted to the right one column (one 
cell's worth), or "indented".  You'd like the contents of any 
subdirectory... to be displayed one cell/inlinenode to the right of the 
column that contained the subdirectory.  To reword once more, and in 
table-speak... any cell which contains a subdirectory name... would want 
its NEXT cell to the right... to contain a LIST or TABLE of that 
subdirectory's contents.  And if IT had a subdirectory, etc etc.  This 
often requires a phenomenon called 'recursion' to "drill" into the 
depths of an unknown-depth heirarchy of data.  Here, take a look at this 
with your newest ie or moz with javascript-ON...

http://www.winternet.com/~wingnut/html/test/localfile_readers/xreader58.htm

[See 'info toggle' button or email me direct for help]

Just an alpha experiment.  Press the 'tablitrack' button once... to 
change the table from tablitrack mode (show cell id's) to data mode 
(show data).  Now look carefully at the table, and feel free to click on 
any cell who's data ends in 'coll'.  This is an indicator that this cell 
contains a COLLECTION, or in your case, a subdirectory.  Look to the 
source code for the function called tablify() to see the recursive JS 
function.  The kind of indenting seen in this table... I think... is 
somewhat what you're looking for.

To briefen this mess up a bit... you might want to look at CSS's 
.display="none" and .visibility="hidden" versus .visibility="collapse". 
  These are places where an element can be told TO display, or NOT TO 
display but DO use up the normally-allocated space as if you WERE 
displayed, or NOT TO display and DON'T keep the allocated space.  If I 
understand your situation, something in this part of town... should get 
you on the right track.  You'll find that keeping track of how far one 
is indented or shifted... is an important thing in drilling or 
"traversing" thru a heirarchy.  Everytime I came across a collection 
(subdir) during my traversals, I 'pushed' the collection object into a 
local array or collection.  And, I'd POP it off the array each time the 
heirarchy exited a level or 5.  Then, at anytime in the traversal, I 
could determine how many "indent cells" were needed in any given row 
(determine which column the next work must go-on) ... just by measuring 
the size of the array.  It kept a "running total" of indents.  (I'm 
getting a bit off-subject here.  Sorry). :)

Another quick note.  Do keep in mind that this pad-cell you might be 
wanting... MIGHT need to contain the NAME of the subdirectory and maybe 
an image of a folder icon.  So, you might want to display this pad-cell, 
but in a different way than normal filename cells in a given column.

> 
> Here's the source example:
> 
> http://www.geocities.com/stanio/test/treetable.html
> 
> I can't determine if what I'm trying would be possible using the 
> 'move-to' property from the current "Generated and replaced content" 
> draft but I think an additional keyword value: 'bypass' (or something), 
> for the 'display' property, would describe/solve the situation pretty 
> simply. Does it sound reasonable?
> 

I'll leave that one to the geniuses. :)  There are a few people working 
on dom2 "tree views", so do some thorough web searches, too.  I hope 
some of this stuff helps.  If not, just ignore me. :)

Best!

Wingnut
Minneapolis

Received on Monday, 15 March 2004 06:02:00 UTC