List enumeration values out of the schema

Are you missing a feature? Request its implementation here.
nexius
Posts: 4
Joined: Thu Dec 09, 2004 11:45 pm
Contact:

List enumeration values out of the schema

Post by nexius »

First of all, fantastic program

It would be nice if for enumeration tags it listed the possible values to choose from, like the way it lists the possible tags.
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

Oxygen handles enumerations and presents these values when attribute values are inserted. It follows simple types also on unuions and lists to get the enumeration values. Do you mean something different?

You may consider also useful changing the content completion source from the schema to the document structure and back. To use the document structure use the Learn structure action. This will learn also all attribute values. To go back to the schema driven content completion perform a validation action.

Best Regards,
George
nexius
Posts: 4
Joined: Thu Dec 09, 2004 11:45 pm
Contact:

Post by nexius »

You're right, it does list them conveniently for attributes. But it doesn't appear to do this for the values of tags. That's what I meant

I'll try the learn structure feature, thanks
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

That will be available in the next release together with some other content completion improvements.

Best Regards,
George
nexius
Posts: 4
Joined: Thu Dec 09, 2004 11:45 pm
Contact:

Post by nexius »

I have oxygen version 5.1 and this feature does not appear to be included
Which version will have this feature?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

It was included in version 5.1. Try for instance the following schema: test.xsd

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="root">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:element ref="test"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="test" type="Test"/>
<xs:simpleType name="Test">
<xs:restriction base="xs:string">
<xs:enumeration value="v1">
<xs:annotation>
<xs:documentation>The first value</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="v2">
<xs:annotation>
<xs:documentation>The second value</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:schema>
with an instance like:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="test.xsd" test="v1">
<test></test>
</root>
It is true that this does not work if the simple type is anonymous. This problem is already fixed in the current development stream.

Best Regards,
George
Post Reply