Using "explicit" markup (HTML and other tags)?

Consider the goal to set some attributes in a “block-level” element (like P or H1 in HTML), that is

  • the start and end tags should be written explicitly,
  • but the element content should be processed in Markdown-syntax.

This is not parsed (ie the content is treated as “raw HTML” rather than
processed as Markdown syntax):

<P id=ex1 class=special> 
This is a *special* paragraph.

This neither:

<P id=ex2 class=special>
This is a *special* paragraph.

This also is not parsed:

<P id=ex3 class=special>This is a *special* paragraph.</P>

Nor is this:

<H1 id=ex4 title="Special Heading">A *special* heading</H1>

This does not help much:

<H1 id=ex5 title="Special Heading">

This *is not* a heading anymore!


The same problem exists with non-HTML element type names. This is parsed, but gets wrapped into an extra <P>:

<FOO id=ex6>Some *special* element?</FOO>

This is not wrapped, but neither parsed:

<FOO id=ex7>
Some *special* element?

As far as I can tell, all this behaviour conforms to the CommonMark specification.

Am I missing something in the spec? Is my goal too esoteric, and can not be achieved in CommonMark? Should it be possible?

Babelmark shows that existing implementations behave all over the place for these examples, and pretty much none does the trick (marked comes closest, but is very incompatible anyway).