+1 to add schema location Folks, pls. check the conversation between me and Elmar on the issue. First, I think it is unnecessary to add schema location for these XML files since there's no validation issue either in Intellij Idea or in runtime, but I change my mind later since I realize it will help Eclipse user's experience if we have this.
What do you think? If someone using eclipse can verify Elmar's pull request, that'll be great. -Ian. On Fri, Sep 14, 2018 at 3:44 PM Xiao Chen <chx...@gmail.com> wrote: > Hi There, > > > > I’m using Eclipse for building Dubbo; it reports several validation issues > that are caused by schemaLocation problem: > > 1. In both /dubbo-config-spring/src/main/resources/META-INF/dubbo.xsd > and /dubbo-config-spring/src/main/resources/META-INF/compat/dubbo.xsd. > Eclipse complains that “Cannot resolve the name 'beans:property' to a(n) > 'element declaration' component.” > > This can be resolved by add schemaLocation to xsd:import. That is, change > the line: > > <xsd:import namespace="http://www.springframework.org/schema/beans"/> > > *To:* > > <xsd:import namespace="http://www.springframework.org/schema/beans" > schemaLocation=" > http://www.springframework.org/schema/beans/spring-beans-4.3.xsd"/> > > > > 2. In > > /dubbo-config-spring/src/test/resources/org/apache/dubbo/config/spring/annotation-consumer.xml, > it has following lines: > > xsi:schemaLocation="http://www.springframework.org/schema/beans > http://www.springframework.org/schema/beans/spring-beans-4.3.xsd > > http://dubbo.apache.org/schema/dubbo > http://dubbo.apache.org/schema/dubbo"> > > the schemaLocation for dubbo (marked in red) is wrong. It should be a file > location, not a folder. It should be changed to > http://dubbo.apache.org/schema/dubbo/dubbo.xsd. > > > > Other developers using Intellij idea have said there is no issue with their > tools. > > > Can you guys advise whether above issues should be fixed? It brings > convenience to Eclipse users and is not harmful to anyone else. > > > > An PR and an issue are created at: > > https://github.com/apache/incubator-dubbo/pull/2470 > https://github.com/apache/incubator-dubbo/issues/2471 > > > > > > Thanks, > > Elmar >