At 03:50 AM 2000-04-03 -0500, Matt Sisk wrote:
>"Sean M. Burke" wrote:
>>[...]
>> And to that end, I think I'll add a new pseudo-element named "~null" or
>> something, so that any element whose tag name is "~null" will be
>> special-cased so starttag and endtag will both return ''.  The element
>> would still be in the tree, tho, and so would still be visible to
>> traversal, and in $parent->content_list, etc.  But if you want to make an
>> existing HTML node invisible, then you'd do something like:
>>  $it->attr('_real_tag', $it->attr('_tag', '~null'));
>> and to make it visible again:
>>  $it->attr('_tag', $it->attr('_real_tag', undef));
>> (recall that the return value of a PUT call to attr() is the old value; a
>> handy feature at times!)
>> Does this ~null idea sound good to everyone?
>
>This sounds good to me in general. In cases where the ~null element has
>content, would you prune by default, or expect the whole sub tree to
>have ~null tags? (that is, assuming you wanted to hide the whole sub
>tree, as I tend to do)
A good idea.  I suppose I could make a ~thinly_null too, that is just like
~null except that its children (if any) aren't invisible to as_HTML.

--
Sean M. Burke [EMAIL PROTECTED] http://www.netadventure.net/~sburke/

Reply via email to