Page 1 of 1

Viewing enumeration values in the Design view

Posted: Tue Nov 01, 2011 12:34 pm
by matsek
Hi,

When reviewing an XML schema in the Design view, I always feel I need to switch to the Text view every time I want to see what enumeration values an element accepts (simple type element with enumeration type restriction). Is there any way to see the enumeration values an element accepts directly in the Design view?

Thanks,
Mats

Re: Viewing enumeration values in the Design view

Posted: Tue Nov 01, 2011 4:42 pm
by adrian
Hello,

When you select such an element, you should be able to see the enumeration values in the Facets view(Window -> Show View -> Facets), usually docked in the bottom right corner.

e.g. For this element the enumeration values(true/false) are clearly seen in Facets.

Code: Select all

<xs:element name="received">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="true"/>
<xs:enumeration value="false"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
If you have an element declaration for which the Facets view doesn't seem to show the enumeration values, please send us a small snippet or sample from the schema. You can send them to our support email address:
support@oxygenxml.com

Regards,
Adrian

Re: Viewing enumeration values in the Design view

Posted: Tue Nov 01, 2011 6:40 pm
by matsek
Thank you so much Adrian. Your answer was very helpful.

Re: Viewing enumeration values in the Design view

Posted: Fri Apr 17, 2015 2:55 pm
by Lars Skjærlund
I've come this far on my own; but how do you add/edit enumeration values in Design View?

Regards,
Lars

Re: Viewing enumeration values in the Design view

Posted: Fri Apr 17, 2015 3:23 pm
by adrian
Hello Lars,

To add/edit enumeration values in the Design view, first select in the diagram the simple type that uses the restriction and look in the Facets view (Window > Show View > Facets) for the Enumerations entry. Right click on the Enumerations entry from the view and from the contextual menu pick Add. Type the value in new enumeration entry and press ENTER. To edit an enumeration value, you can double click it there in the Facets view.

Note that the enumeration values do not appear in the diagram, they are only visible in the Facets view.

Regards,
Adrian