Page 1 of 1

Annotations and Tag Sense

Posted: Fri Oct 28, 2005 3:10 am
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!

Re: Annotations and Tag Sense

Posted: Fri Oct 28, 2005 3:57 pm
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

Awesome!

Posted: Tue Nov 01, 2005 3:20 am
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...

<redifine> Sensing

Posted: Tue Nov 01, 2005 3:46 am
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?

Posted: Tue Nov 01, 2005 12:17 pm
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

I Should Be More Specific

Posted: Wed Nov 02, 2005 11:28 pm
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!)

Posted: Thu Nov 03, 2005 10:31 am
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

I Will Wait...

Posted: Fri Nov 04, 2005 12:02 am
by NicoleTedesco
I see...future release...gotcha. Thx

Posted: Tue Dec 20, 2005 6:40 pm
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