XML Editor code completion failures with attributes in xsd schema [message #62110] |
Thu, 06 January 2005 08:18  |
Eclipse User |
|
|
|
Hi folks,
I am just playing around with the XML Editor of webtoolsM2, and I found
something strange. Perhaps this issue is known to you (bugs.eclipse.org
doesn't know anything).
I have a xml file that is evaluated by a xsd schema. The XML Editor
generates also the cool code completion from the xsd file. So far so good.
But I have some problems with references. With a reference on attribute
groups everything works fine. Even enumeration works perfectly. But if I
have a reference on an attribute the code completion doesn't work.
As workaround I could refactor all my attributes in the xsd to
attributeGroups I guess, but that's not what the inventor wanted...
some code examples to illustrate.
in the xml file:
<macro display="whenreferenced">
the display attribute code completion works great,
because it is an attribute group in the xsd schema:
<xs:attributeGroup ref="display_macro" />
...
but there are also some other attributes macro has and the XML Editor
doesn't display in the code completion like:
<xs:attributeGroup ref="display_macro" />
<xs:attribute ref="language" use="optional" />
<xs:attribute ref="searchon" use="optional" />
....language and searchon aren't recognized.
To repeat precisely: If I write "<macro " and then press the Strg-Space
for code completion it only displays "display" NOT "display","language"
and "searchon".
For instance - the searchon attribute on the root of the xsd looks like:
<xs:attribute name="searchon">
<xs:annotation>
<xs:documentation xml:lang="en">
....
</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="form">
<xs:annotation>
<xs:documentation xml:lang="en">
...
</xs:documentation>
</xs:annotation>
</xs:enumeration>
<xs:enumeration value="lemma">
<xs:annotation>
<xs:documentation xml:lang="en">
...
</xs:documentation>
</xs:annotation>
</xs:enumeration>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
(I hope you get a rough impression about the problem with the code)
Any ideas about that issue?
Thanks a lot, and thanks for providing something cool like the xml
editor - it is a wonderful tool - even and especially as M2...
Regards,
Raphael
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03665 seconds