|go ahead... be a heretic|
Re: OO style question: how much information to hide?by webfiend (Vicar)
|on Jun 11, 2003 at 00:54 UTC||Need Help??|
The explicit delete ... if ... seems more readable to me, in a narrative sense. Somebody else taking a casual glance at the other chunk might be concerned that time was being spent deleting attributes from end tags. It wouldn't take them long to discover the truth of the matter, but it's still something in the back of their head.
On the other hand, perhaps you want a method besides as_is() for printing purposes? Maybe something like this:
Of course, this example could be modified for the realities of style and ... well ... reality :-)