Page 1 of 1

required element and css display property

Posted: Mon Jul 07, 2014 6:18 pm
by LBarth
Hi,

I use oxygen author with the following schema (fragment) :
[code]
<xs:element name="OuDormir">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" ref="TexteIntro"/>
<xs:element ref="NomEtablissement"/>
<xs:element minOccurs="0" ref="NomProprietaire"/>
...
</xs:complexType>
</xs:element>
[/code]
Author is schema aware and the option "Reject action when its result is invalid" is checked.

When I set the 'display' property of TexteIntro, NomEtablissement etc to 'inline' in the css file it is ok, I have a message when I try to delete the NomEtablissement element as it is required.

If I set the 'display' property of TexteIntro, NomEtablissement etc to 'block' I can delete the NomEtablissement element although it is required.

What is happening ?

Regards,
Lionel

Re: required element and css display property

Posted: Tue Jul 08, 2014 4:13 pm
by alex_jitianu
Hi,

The schema aware option you refer to is the one from action "Delete element tags with backspace and delete", right? Unfortunately the fact that NomEtablissement is a required element is not taken into account yet by the schema aware support. We have an issue already recorded to check if the deleted element is a required one and as it happens, we already did some work on it in the current development stream. Chances are it will be available in the next minor version.

I suspect you are now getting different results because of different strategies that are applied in block/inline contexts. Sometimes, even the fact that the tags of the element are rendered or not, influences which solutions are being applied. If you uncheck Smart delete (just for testing purposes) (same option page as the option you've mentioned) you should get a similar behavior no matter the display property of the elements.

Best regards,
Alex

Re: required element and css display property

Posted: Fri Jul 11, 2014 1:58 pm
by LBarth
Hi Alex,

I do not have the same behavior if I uncheck Smart delete in the preferences.
It makes a difference with the css display:block but it makes no difference with the css display:inline.

In fact with the css display:inline no tag can be remove even if the schema declares it optional (but it is fine for my prupose…).

Best regards,
Lionel