Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Missing namespace prefix using content assist
Missing namespace prefix using content assist [message #484963] Thu, 10 September 2009 00:36 Go to next message
Brian Yu is currently offline Brian YuFriend
Messages: 10
Registered: July 2009
Junior Member
Hi all,

I have a custom XML Editor which provides a content assist help for some
XML elements and attributes. The issue is when upon selecting an element
attribute through the suggested content assist menu(Ctrl+Space), it does
not include the namespace prefix.
Hence the editor validation complains that the attribute is not recognized
for the element.

I am specifying the XML catalog using the
org.eclipse.wst.xml.core.catalogContributiones extension, the XML editor
successfully populates a list of suggested XML elements with the namespace
prefix in the content assist. But only for the element's custom
attributes, the content assist does not populate with the namespace prefix.

<u>Below is the plugin extension where I define my own datatypes:</u>
<extension
point="org.eclipse.wst.xml.core.catalogContributions">
<catalogContribution
id="CompanyAbc">
<uri
name="http://www.AbcCompany.com/myxml-extension"
uri="template/datatypes.xsd">
</uri>
</catalogContribution>
</extension>

<u>The XML content:</u>
<xml … xmlns:myPrefix="http://www.AbcCompany.com/myxml-extension"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
…
<!-- custom tag with failed unrecognized attribute myTagAttr -->
<myTag name="myTag" customAttr="true">


And as expected when I manually modify the attribute in the editor with
the namespace prefix, the attribute is recognized and editor validation is
successful.
<myTag name="myTag" myPrefix:customAttr="true">


Anyone else experiencing this? Please help.

Thank you,
Brian
Re: Missing namespace prefix using content assist [message #485212 is a reply to message #484963] Thu, 10 September 2009 19:30 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
Registered: July 2009
Senior Member

Brian Yu wrote:
> Hi all,
>
> I have a custom XML Editor which provides a content assist help for some
> XML elements and attributes. The issue is when upon selecting an element
> attribute through the suggested content assist menu(Ctrl+Space), it does
> not include the namespace prefix.
> Hence the editor validation complains that the attribute is not
> recognized for the element.
> I am specifying the XML catalog using the
> org.eclipse.wst.xml.core.catalogContributiones extension, the XML editor
> successfully populates a list of suggested XML elements with the
> namespace prefix in the content assist. But only for the element's
> custom attributes, the content assist does not populate with the
> namespace prefix.
>
> <u>Below is the plugin extension where I define my own datatypes:</u>
> <extension
> point="org.eclipse.wst.xml.core.catalogContributions">
> <catalogContribution
> id="CompanyAbc">
> <uri
> name="http://www.AbcCompany.com/myxml-extension"
> uri="template/datatypes.xsd">
> </uri>
> </catalogContribution>
> </extension>
>
> <u>The XML content:</u>
> <xml � xmlns:myPrefix="http://www.AbcCompany.com/myxml-extension"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> �
> <!-- custom tag with failed unrecognized attribute myTagAttr -->
> <myTag name="myTag" customAttr="true">
>
>
> And as expected when I manually modify the attribute in the editor with
> the namespace prefix, the attribute is recognized and editor validation
> is successful.
> <myTag name="myTag" myPrefix:customAttr="true">
>
>
> Anyone else experiencing this? Please help.

Sounds like it might be related to 261612.

bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=261612

--
---
Nitin Dahyabhai
Eclipse WTP Source Editing
IBM Rational


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Missing namespace prefix using content assist [message #485258 is a reply to message #485212] Fri, 11 September 2009 01:04 Go to previous message
Brian Yu is currently offline Brian YuFriend
Messages: 10
Registered: July 2009
Junior Member
Thank you for the reference, Nitin.

It looks like bug 261612, is also running into this issue.
Went ahead and added in a vote.

Thank you,
Brian

Nitin Dahyabhai wrote:

> Brian Yu wrote:
>> Hi all,
>>
>> I have a custom XML Editor which provides a content assist help for some
>> XML elements and attributes. The issue is when upon selecting an element
>> attribute through the suggested content assist menu(Ctrl+Space), it does
>> not include the namespace prefix.
>> Hence the editor validation complains that the attribute is not
>> recognized for the element.
>> I am specifying the XML catalog using the
>> org.eclipse.wst.xml.core.catalogContributiones extension, the XML editor
>> successfully populates a list of suggested XML elements with the
>> namespace prefix in the content assist. But only for the element's
>> custom attributes, the content assist does not populate with the
>> namespace prefix.
>>
>> <u>Below is the plugin extension where I define my own datatypes:</u>
>> <extension
>> point="org.eclipse.wst.xml.core.catalogContributions">
>> <catalogContribution
>> id="CompanyAbc">
>> <uri
>> name="http://www.AbcCompany.com/myxml-extension"
>> uri="template/datatypes.xsd">
>> </uri>
>> </catalogContribution>
>> </extension>
>>
>> <u>The XML content:</u>
>> <xml ᅵ xmlns:myPrefix="http://www.AbcCompany.com/myxml-extension"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>> ᅵ
>> <!-- custom tag with failed unrecognized attribute myTagAttr -->
>> <myTag name="myTag" customAttr="true">
>>
>>
>> And as expected when I manually modify the attribute in the editor with
>> the namespace prefix, the attribute is recognized and editor validation
>> is successful.
>> <myTag name="myTag" myPrefix:customAttr="true">
>>
>>
>> Anyone else experiencing this? Please help.

> Sounds like it might be related to 261612.

> bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=261612
Previous Topic:JavaScript validation errors/warns I cannot solve
Next Topic:Re: Configuring dynamic web project on existing svn checkout
Goto Forum:
  


Current Time: Sat Apr 20 04:08:11 GMT 2024

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

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

Back to the top