note element specializations: Oxygen issues
Posted: Tue May 09, 2023 3:42 pm
Instead of forcing users to manually set the @type attribute of <note> elements, I specialized elements such as <caution>, <tip>, <warning>, etc. The @type attribute of each specialized elemens has been defined as REQUIRED and allows only the corresponding value: for example, <caution> has @type set to caution:
type (caution) #REQUIRED
However, there are a couple of problems when these elements are inserted via Oxygen:
1. When one of the specialized elements is inserted, the @type attribute is added, but set to an empty value, & thus causes a validation error:
<!ENTITY % caution.attributes
"type (caution) #REQUIRED
spectitle CDATA #IMPLIED
othertype CDATA #IMPLIED
%univ-atts;
outputclass CDATA #IMPLIED">
2. When one of the specialized note elements is inserted in Author mode, a dropdown containing the <note> element's allowed @type values is displayed, which then allows users to specify invalid values, such as setting the <caution> element's @type to "warning". A screenshot is attached that shows both the empty @type and Oxygen allowing invalid values to be selected. .
How do I get get Oxygen to respect the DTD, instead of introducing validation errors. In other words, is there a setting or preferences that forces Oxygen to automatically add required attribute values when an element is inserted, and to not display the dropdown that allows users to select invalid values?
Thank you for your help.
type (caution) #REQUIRED
However, there are a couple of problems when these elements are inserted via Oxygen:
1. When one of the specialized elements is inserted, the @type attribute is added, but set to an empty value, & thus causes a validation error:
<!ENTITY % caution.attributes
"type (caution) #REQUIRED
spectitle CDATA #IMPLIED
othertype CDATA #IMPLIED
%univ-atts;
outputclass CDATA #IMPLIED">
2. When one of the specialized note elements is inserted in Author mode, a dropdown containing the <note> element's allowed @type values is displayed, which then allows users to specify invalid values, such as setting the <caution> element's @type to "warning". A screenshot is attached that shows both the empty @type and Oxygen allowing invalid values to be selected. .
How do I get get Oxygen to respect the DTD, instead of introducing validation errors. In other words, is there a setting or preferences that forces Oxygen to automatically add required attribute values when an element is inserted, and to not display the dropdown that allows users to select invalid values?
Thank you for your help.