Skip Menu |

This queue is for tickets about the HTML-Tree CPAN distribution.

Report information
The Basics
Id: 64101
Status: rejected
Priority: 0/
Queue: HTML-Tree

People
Owner: Nobody in particular
Requestors: hippietrail [...] yahoo.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: method to query whether an element is block or inline
I seem to often write code using HTML::Parser which wants to do different things for inline and block elements but none of the modules have methods to retrieve this information about the various elements. I always end up putting together a list by trial and error. Something definitive and deterministic would be a great improvement.
Isn't HTML::Tagset providing this information?
From: hippietrail [...] yahoo.com
On Tue Dec 21 17:37:38 2010, GAAS wrote: Show quoted text
> Isn't HTML::Tagset providing this information?
Oh I wasn't aware of HTML::Tagset so maybe that is where the information belongs but it currently is not there either. Some tags are neither block nor inline but inherit this attribute from their parent. I'm not sure how best to handle these. Ideally the information would even be provided for deprecated tags like marquee and flash which I still encounter in the wild. It would also be useful to mark the script and style tags to indicate that text within them is not supposed to be rendered.
I agree that HTML::Tagset is the place for this information, you would need to open a bug against that package to get it added, then when that's out we'd need to patch HTML::TreeBuilder to use the new function. This page seems to give a pretty good explanation of what the block level tags are http://htmlhelp.com/reference/html40/block.html Cheers, Jeff.
Closing this ticket as HTML::Tree is not the right place for this discussion. Cheers, Jeff.