Annotations and Tag Sense

Are you missing a feature? Request its implementation here.
NicoleTedesco
Posts: 10
Joined: Fri Sep 02, 2005 9:52 pm
Location: Seattle, WA

Annotations and Tag Sense

Post by NicoleTedesco »

I have a fairly complex schema and am trying to author XML documents based on that schema in Oxygen 6.2. The problem is, the Oxygen editor does not seem to find annotations if they are defined below the "element" declaration level. What I would like to see your editor do is to seek the first annotation in the type that an element may be associated with if the element itself does not have an overriding annotation (seek as deep as necessary for complicated type-within-type and inheritance scenarios). Also make sure that annotations are displayed with group and attributeGroup inclusions as well.

Thanks again!
- Nicole Tedesco
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Annotations and Tag Sense

Post by sorin_ristache »

Hello,
NicoleTedesco wrote:seek the first annotation in the type that an element may be associated with if the element itself does not have an overriding annotation

...

Also make sure that annotations are displayed with group and attributeGroup inclusions
The algorithm of computing the annotation tooltip of the content completion popup will be enhanced in a future version.

Thank you,
Sorin
NicoleTedesco
Posts: 10
Joined: Fri Sep 02, 2005 9:52 pm
Location: Seattle, WA

Awesome!

Post by NicoleTedesco »

I supposed you don't have a schedule for the release of those changes, eh?

(That's OK, I understand!) :)

Awesome! I can't wait...
- Nicole Tedesco
NicoleTedesco
Posts: 10
Joined: Fri Sep 02, 2005 9:52 pm
Location: Seattle, WA

<redifine> Sensing

Post by NicoleTedesco »

I don't know if this is related, but sensing doesn't seem to work at all for redefines. Are you all aware of this?
- Nicole Tedesco
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Nicole,

No, the content completion should work even if you have a schema that uses redefine. For instance if I have the schemas like below:

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="test">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:group ref="test"/>
</xs:choice>
</xs:complexType>
</xs:element>

<xs:group name="test">
<xs:sequence>
<xs:element ref="a" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="b" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="c" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>
<xs:element name="a"/>
<xs:element name="b"/>
<xs:element name="c"/>
</xs:schema>
testr.xsd

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:redefine schemaLocation="test.xsd">
<xs:group name="test">
<xs:sequence>
<xs:element ref="a"/>
<xs:element ref="c"/>
</xs:sequence>
</xs:group>
</xs:redefine>
</xs:schema>
and an instance against testr.xsd like below:

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<test xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="testr.xsd">
<a/>

</test>
then the content completion will offer c as the only alternative if I try to insert an element after <a/>.

Best Regards,
George
NicoleTedesco
Posts: 10
Joined: Fri Sep 02, 2005 9:52 pm
Location: Seattle, WA

I Should Be More Specific

Post by NicoleTedesco »

What I meant to say is that, in my second schema--the one that actually contains the redefine--I cannot see elements which were defined in the first schema. I can see any of the elements that I overrode from the first (since they are defined in the second schema). So, the tag sense is not helpful in the second schema (though it works fine in the instance documents--thank you!)
- Nicole Tedesco
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Nicole,

Do you mean the values proposed for element references, type references, etc.? That is limited to the scope of the edited document. We plan in the future to extend that to all schemas in the same project.

Best Regards,
George
NicoleTedesco
Posts: 10
Joined: Fri Sep 02, 2005 9:52 pm
Location: Seattle, WA

I Will Wait...

Post by NicoleTedesco »

I see...future release...gotcha. Thx
- Nicole Tedesco
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi Nicole,

Just to let you know that we implemented in the current development stream support for looking up annotations to the element or attribute types if the annotations are not defined for that element or attribute.

Best Regards,
George
Post Reply