Add a div element?

Shaun McCance <shaunm at gnome.org>
Fri Jun 10 12:15:02 EDT 2011

Hi all,

I'm toying around with an extension to do expanders for blocks
and sections. You can make formal blocks and sections collapsible,
but you can also just have a stand-alone expander, like so:

<ui:expander expanded="no">
  <title>The title is always shown</title>
  <p>But this is only shown when expanded</p>
</ui:expander>

The problem is that the fallback behavior for tools that don't
support the extension is a bit weird. It will treat the content
as normal block content, which is right, but it will encounter
that extra title element, which isn't generally valid as block
content.

So I'm thinking of adding a generic div element. It would have
an optional leading title, so could be used as a no-semantics
way to do a formal block or a floating title. You could also
use it without a title for grouping. That's potentially useful
for stuff like conditional processing.

Then the fallback behavior for unknown block content could be
changed to something like "if the unknown block element has a
leading title element, treat it as if the containing element
were a div". 

Thoughts?

--
Shaun