Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Re: Missing element in XML editor autocompletion
Re: Missing element in XML editor autocompletion [message #531806] Thu, 06 May 2010 09:23 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Arnaud,

The WTP project provides the editor, so I'm redirecting your post to
their newsgroup/forum.


Arnaud wrote:
> Hi,
>
> In the following xml file:
> <?xml version="1.0" encoding="UTF-8"?>
> <tst:root
> xmlns:ext="testExt:/test/xsd/validation"
> xmlns:tst="test:/test/xsd/validation"
> >
>
> <tst:positiveComment/>
>
> </tst:root>
>
> only tst:positiveComment and tst:negativeComment take part of eclipse
> XML editor Ctrl+Space auto completion. The element 'ext:extComment'
> is not proposed...
> Is there something wrong in my configuration ?
>
> Both xsd schema are 'defined' using catalogContributions extension point:
> <extension point="org.eclipse.wst.xml.core.catalogContributions">
> <catalogContribution id="myId"> <public
> publicId="test:/test/xsd/validation"
> uri="xsd/test.xsd">
> </public>
> <public
> publicId="testExt:/test/xsd/validation"
> uri="xsd/test_ext.xsd">
> </public>
> </catalogContribution> </extension>
> text.xsd file is:
> <?xml version="1.0" encoding="UTF-8"?> <xsd:schema
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"
> attributeFormDefault="unqualified"
> targetNamespace="test:/test/xsd/validation"
> xmlns:tst="test:/test/xsd/validation">
> <xsd:element name="root">
> <xsd:complexType> <xsd:choice minOccurs="0"
> maxOccurs="unbounded"> <xsd:element ref="tst:comment" />
> </xsd:choice> </xsd:complexType> </xsd:element>
>
> <xsd:complexType name="CommentType" >
> </xsd:complexType>
>
> <!-- test abstract element and subs.group :: WORKS -->
> <xsd:element name="comment" type="tst:CommentType" abstract="true" />
> <xsd:element name="positiveComment" type="tst:CommentType"
> substitutionGroup="tst:comment" />
> <xsd:element name="negativeComment" type="tst:CommentType"
> substitutionGroup="tst:comment" />
>
> </xsd:schema>
>
> and test_ext.xsd is:
> <?xml version="1.0" encoding="UTF-8"?> <xsd:schema
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified"
> attributeFormDefault="unqualified"
> targetNamespace="testExt:/test/xsd/validation"
> xmlns:ext="testExt:/test/xsd/validation"
> xmlns:tst="test:/test/xsd/validation">
> <xsd:import namespace="test:/test/xsd/validation" />
>
> <!-- define a new comment type in substitution group -->
> <xsd:element name="extComment" type="tst:CommentType"
> substitutionGroup="tst:comment" >
> <xsd:annotation><xsd:documentation xml:lang="en">
> This kind of comment is defined in another xsd file...
> </xsd:documentation></xsd:annotation> </xsd:element>
>
> </xsd:schema>
>
> I suspect XML editor doesn't take care of imported substitutionGroup
> element. ? is it possible ?
>
>
> In other hand I can add manually '<ext:extComment/>' after
> positiveComment, then Validate command return No errors
> (meaning test_ext.xsd is known and parsed correctly).
>
> Any suggestion to add 'ext:extComment' in editor proposals ?
>
> Thanks for your help,
> Arnaud.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Missing element in XML editor autocompletion [message #531948 is a reply to message #531806] Thu, 06 May 2010 14:48 Go to previous messageGo to next message
Valentin is currently offline ValentinFriend
Messages: 36
Registered: July 2009
Member
Thanks Ed.

Arnaud, this seems similar to the scenario described in
https://bugs.eclipse.org/bugs/show_bug.cgi?id=247312

Regards, Valentin

"Ed Merks" <Ed.Merks@gmail.com> wrote in message
news:hru1pu$pnc$2@build.eclipse.org...
> Arnaud,
>
> The WTP project provides the editor, so I'm redirecting your post to their
> newsgroup/forum.
>
>
> Arnaud wrote:
>> Hi,
>>
>> In the following xml file:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <tst:root
>> xmlns:ext="testExt:/test/xsd/validation"
>> xmlns:tst="test:/test/xsd/validation"
>> >
>> <tst:positiveComment/>
>> </tst:root>
>>
>> only tst:positiveComment and tst:negativeComment take part of eclipse XML
>> editor Ctrl+Space auto completion. The element 'ext:extComment' is not
>> proposed...
>> Is there something wrong in my configuration ?
>>
>> Both xsd schema are 'defined' using catalogContributions extension point:
>> <extension point="org.eclipse.wst.xml.core.catalogContributions">
>> <catalogContribution id="myId"> <public
>> publicId="test:/test/xsd/validation"
>> uri="xsd/test.xsd">
>> </public>
>> <public
>> publicId="testExt:/test/xsd/validation"
>> uri="xsd/test_ext.xsd">
>> </public>
>> </catalogContribution> </extension>
>> text.xsd file is:
>> <?xml version="1.0" encoding="UTF-8"?> <xsd:schema
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> elementFormDefault="qualified"
>> attributeFormDefault="unqualified"
>> targetNamespace="test:/test/xsd/validation"
>> xmlns:tst="test:/test/xsd/validation"> <xsd:element name="root">
>> <xsd:complexType> <xsd:choice minOccurs="0"
>> maxOccurs="unbounded"> <xsd:element ref="tst:comment" />
>> </xsd:choice> </xsd:complexType> </xsd:element>
>> <xsd:complexType name="CommentType" >
>> </xsd:complexType>
>> <!-- test abstract element and subs.group :: WORKS -->
>> <xsd:element name="comment" type="tst:CommentType" abstract="true" />
>> <xsd:element name="positiveComment" type="tst:CommentType"
>> substitutionGroup="tst:comment" />
>> <xsd:element name="negativeComment" type="tst:CommentType"
>> substitutionGroup="tst:comment" />
>> </xsd:schema>
>>
>> and test_ext.xsd is:
>> <?xml version="1.0" encoding="UTF-8"?> <xsd:schema
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> elementFormDefault="qualified"
>> attributeFormDefault="unqualified"
>> targetNamespace="testExt:/test/xsd/validation"
>> xmlns:ext="testExt:/test/xsd/validation"
>> xmlns:tst="test:/test/xsd/validation"> <xsd:import
>> namespace="test:/test/xsd/validation" />
>> <!-- define a new comment type in substitution group -->
>> <xsd:element name="extComment" type="tst:CommentType"
>> substitutionGroup="tst:comment" >
>> <xsd:annotation><xsd:documentation xml:lang="en">
>> This kind of comment is defined in another xsd file...
>> </xsd:documentation></xsd:annotation> </xsd:element>
>> </xsd:schema>
>>
>> I suspect XML editor doesn't take care of imported substitutionGroup
>> element. ? is it possible ?
>>
>>
>> In other hand I can add manually '<ext:extComment/>' after
>> positiveComment, then Validate command return No errors
>> (meaning test_ext.xsd is known and parsed correctly).
>>
>> Any suggestion to add 'ext:extComment' in editor proposals ?
>>
>> Thanks for your help,
>> Arnaud.
Re: Missing element in XML editor autocompletion [message #532121 is a reply to message #531948] Fri, 07 May 2010 09:05 Go to previous messageGo to next message
Arnaud is currently offline ArnaudFriend
Messages: 31
Registered: July 2009
Member
Hi Valentin,

Thanks for the answer.
Yes it seems to be same kind of problem described in https://bugs.eclipse.org/bugs/show_bug.cgi?id=247312

The Crying or Very Sad sad news is the patch to fix the issue was made last year but not finished/pushed into WTP. SO I haven't a chance to get issue fixed in next (few) release.

Thanks for your help,
Arnaud.
Re: Missing element in XML editor autocompletion [message #532247 is a reply to message #532121] Fri, 07 May 2010 16:30 Go to previous message
Valentin is currently offline ValentinFriend
Messages: 36
Registered: July 2009
Member
Hi Arnaud, yes, I worked on a solution when the bug was opened but the
problem is complex and at the time it seemed to me that the risks of
breaking existing function outweighed the benefits. Time permitting I'll try
to take a look at it again. Let's continue the conversation in the bugzilla.

Valentin

"Arnaud" <ademuyser@fr.ibm.com> wrote in message
news:hs0l50$p6o$1@build.eclipse.org...
> Hi Valentin,
>
> Thanks for the answer.
> Yes it seems to be same kind of problem described in
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=247312
>
> The :cry: sad news is the patch to fix the issue was made last year but
> not finished/pushed into WTP. SO I haven't a chance to get issue fixed in
> next (few) release.
>
> Thanks for your help,
> Arnaud.
Previous Topic:Is there code example for inferring a method?
Next Topic:[Contribution] Want to contribute DocBook-Eclipse-Help tutorial
Goto Forum:
  


Current Time: Thu Apr 25 19:55:29 GMT 2024

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

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

Back to the top