required element and css display property

Oxygen general issues.
LBarth
Posts: 26
Joined: Mon Mar 04, 2013 1:42 pm

required element and css display property

Post 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
alex_jitianu
Posts: 1008
Joined: Wed Nov 16, 2005 11:11 am

Re: required element and css display property

Post 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
LBarth
Posts: 26
Joined: Mon Mar 04, 2013 1:42 pm

Re: required element and css display property

Post 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
Post Reply