Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » XML Editor code completion failures with attributes in xsd schema
XML Editor code completion failures with attributes in xsd schema [message #62110] Thu, 06 January 2005 08:18 Go to next message
Eclipse UserFriend
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
Re: XML Editor code completion failures with attributes in xsd schema [message #62134 is a reply to message #62110] Thu, 06 January 2005 09:03 Go to previous messageGo to next message
Eclipse UserFriend
Raphael A. Bauer wrote:

> 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.

Raphael, this sounds like a bug in our grammar support for XML Schema.
Please open a bugzilla bug for this. If you'd like to dig into the code
and find a fix yourself you may want to start looking at the
org.eclipse.wst.xsd.contentmodel plugin (probably in XSDImpl.java or
XSDVisitor.java).

Thanks for the nice feedback and please continue posting problems and
opening bugs. It's always good for us to understand what function you're
finding useful in addition to problem reports... so thanks for that.
Re: XML Editor code completion failures with attributes in xsd schema [message #62229 is a reply to message #62110] Thu, 06 January 2005 10:50 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: amnon.netvision.net.il

Please forgive my Eclipse-newbieness...

Where can I get a hold of Webtools2?

Thanks,
Amnon

Raphael A. Bauer wrote:
> 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
Re: XML Editor code completion failures with attributes in xsd schema [message #62254 is a reply to message #62229] Thu, 06 January 2005 11:01 Go to previous messageGo to next message
Eclipse UserFriend
Hi Amnon,

>Please forgive my Eclipse-newbieness...
>
>Where can I get a hold of Webtools2?

You can download the M2 release of the Web Tools Platform (WTP) project
from the WTP downloads page. Go to http://www.eclipse.org/webtools. Select
"The Eclipse Web Tools Platform Project Developement Resources". Now
select "Eclipse WTP Downloads". This page contains all of the WTP builds.
Scroll down to stable builds and you will see 1.0M2.

You can also reach this page directly by following this link
http://download.eclipse.org/webtools/downloads/drops/S-1.0M2 -200412230036/index.html


Lawrence
Re: XML Editor code completion failures with attributes in xsd schema [message #62325 is a reply to message #62254] Thu, 06 January 2005 12:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: amnon.netvision.net.il

Thanks!

Lawrence Mandel wrote:
> Hi Amnon,
>
>
>>Please forgive my Eclipse-newbieness...
>>
>>Where can I get a hold of Webtools2?
>
>
> You can download the M2 release of the Web Tools Platform (WTP) project
> from the WTP downloads page. Go to http://www.eclipse.org/webtools. Select
> "The Eclipse Web Tools Platform Project Developement Resources". Now
> select "Eclipse WTP Downloads". This page contains all of the WTP builds.
> Scroll down to stable builds and you will see 1.0M2.
>
> You can also reach this page directly by following this link
> http://download.eclipse.org/webtools/downloads/drops/S-1.0M2 -200412230036/index.html
>
>
> Lawrence
>
>
Re: XML Editor code completion failures with attributes in xsd schema [message #62371 is a reply to message #62254] Thu, 06 January 2005 13:08 Go to previous message
Eclipse UserFriend
Originally posted by: amnon.netvision.net.il

What's the difference between the SDK version and the normal one (apart
from 10MB :-))

I know what an SDK is in the general sense... :-)

Thanks,
Amnon

Lawrence Mandel wrote:
> Hi Amnon,
>
>
>>Please forgive my Eclipse-newbieness...
>>
>>Where can I get a hold of Webtools2?
>
>
> You can download the M2 release of the Web Tools Platform (WTP) project
> from the WTP downloads page. Go to http://www.eclipse.org/webtools. Select
> "The Eclipse Web Tools Platform Project Developement Resources". Now
> select "Eclipse WTP Downloads". This page contains all of the WTP builds.
> Scroll down to stable builds and you will see 1.0M2.
>
> You can also reach this page directly by following this link
> http://download.eclipse.org/webtools/downloads/drops/S-1.0M2 -200412230036/index.html
>
>
> Lawrence
>
>
Previous Topic:Navigation in JSP with M2
Next Topic:WYSIWYG Editors for HTML/JSP/CSS
Goto Forum:
  


Current Time: Sun May 11 08:35:39 EDT 2025

Powered by FUDForum. Page generated in 0.03615 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top