Hi Wendell,

I assume that you're hiding the empty head element by
        sect > head:empty {
                display: none;
        }

If you use
        sect > head:empty {
                content: "";
        }
instead, you should get the desired behavior: No placeholder is displayed - neither for head nor for sect. (Still you're able to move the cursor to any position inside to add content.)
The reason for this lies in the default logic of the placeholders to be displayed: When there is no content to be displayed and explicitly content assigned (directly or to :before or :after) it is hidden. Since there is no value "none" for -oxy-show-placeholder you can hide it by assigning empty content.


BTW:
Why do you want to allow sections without heading? I recently changed our schema to forbid this since
        <sect>
                <head>Heading</head>
                <p>some text</p>
        </sect>
        <sect>
                <head/>
                <p>some more text</p>
        </sect>
looks in the output identical to
        <sect>
                <head>Heading</head>
                <p>some text</p>
                <p>some more text</p>
        </sect>



Regards,

Patrik

------------------------------------------------------------------
Systemarchitektur & IT-Projekte
Tel: +49 40 33449-1142
Fax: +49 40 33449-1400
E-Mail: patrik.stellmann@gdv-dl.de




Von:        Wendell Piez <wapiez@wendellpiez.com>
An:        "oxygen-user@oxygenxml.com" <oxygen-user@oxygenxml.com>
Datum:        06.11.2013 20:55
Betreff:        [oXygen-user] Displaying empty elements (or not)
Gesendet von:        oxygen-user-bounces@oxygenxml.com




Hi folks,

oXygen supports the CSS3 selector :empty, so (for example) we can hide
an element that has no content styled, in the Author View, for
"preview", while showing it in an editing style.

This is useful when, for example, editing documents whose schemas
require elements in places where the user has no content for them. So
if we have

<sect><head/><p>Headless section</p></sect>

we don't have to see anything where the empty 'head' element is, at
least when oXygen Author is set to "No Tags".

Unfortunately, however, since CSS isn't XPath, there's no way to
suppress the 'sect' element, when we have

<sect><head/></sect>

(We can make the 'head' disappear but then we see a placeholder for the 'sect'.)

I know the correct solution is not to deploy schemas that require
elements that are not always used. But I wonder if anyone has a CSS
workaround or an oXygen extension to suggest so that my oXygen XML
Author preview can show something more like what the document will
look like when it is formatted and the offending elements are dropped.

Any ideas?

Thanks, Wendell

Wendell Piez |
http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables
_____oo_________o_o___ooooo____ooooooo_^
_______________________________________________
oXygen-user mailing list
oXygen-user@oxygenxml.com
http://www.oxygenxml.com/mailman/listinfo/oxygen-user

GDV Dienstleistungs-GmbH & Co. KG
Glockengießerwall 1
D-20095 Hamburg
www.gdv-dl.de

Sitz und Registergericht: Hamburg
HRA 93 894
USt.-IdNr : DE 205183123

Komplementärin:
GDV Beteiligungsgesellschaft mbH
Sitz und Registergericht: Hamburg
HRB 71 153

Geschäftsführer:
Volker Sonnenburg
Heiko Beermann

------------------------------------------------------------------
Diese E-Mail und alle Anhänge enthalten vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe der E-Mail ist nicht gestattet.

This e-mail and any attached files may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distributionof the material in this e-mail is strictly forbidden.