Viewing enumeration values in the Design view

Oxygen general issues.
matsek
Posts: 12
Joined: Tue Nov 01, 2011 12:24 pm

Viewing enumeration values in the Design view

Post 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
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Viewing enumeration values in the Design view

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
matsek
Posts: 12
Joined: Tue Nov 01, 2011 12:24 pm

Re: Viewing enumeration values in the Design view

Post by matsek »

Thank you so much Adrian. Your answer was very helpful.
Lars Skjærlund
Posts: 5
Joined: Sun Nov 20, 2005 11:12 pm
Location: Denmark
Contact:

Re: Viewing enumeration values in the Design view

Post 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
adrian
Posts: 2855
Joined: Tue May 17, 2005 4:01 pm

Re: Viewing enumeration values in the Design view

Post 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
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Post Reply