Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Content Assist filtering
Content Assist filtering [message #173398] Thu, 06 July 2006 16:27 Go to next message
Brian Jakubik is currently offline Brian JakubikFriend
Messages: 140
Registered: July 2009
Senior Member
I have the following schema (snippet), and I want to only allow the user to
put in one tag1 in the parent, but content assist allows me to do as many as
I want (assuming from the maxOccurs="unbounded").

<xsd:element name="parent">
<xsd:choice minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="tag1" minOccurs="0" maxOccurs="1"/>
<xsd:element ref="tag2" minOccurs="0" maxOccurs="1"/>
<!-- other items that can appear * time... -->
<xsd:attribute name="should" type="xsd:boolean"/>

So when im in content assit, I want to filter out the entry tag1 if the
parent already has one,

I have my class that extends XMLContentAssistProcessor and think i could
figure out if it should be in the list by digging into the
contentassistrequest dom stuff ... and removing it from the proposal list if
it exists.

Does anyone see anything wrong with this approach, any side affects I might
be creating, or have a better suggestion (other than changing the schema)?

Brian J
Re: Content Assist filtering [message #173534 is a reply to message #173398] Sat, 08 July 2006 01:07 Go to previous message
Craig Salter is currently offline Craig SalterFriend
Messages: 169
Registered: July 2009
Senior Member
The 'strict' content assist option may help ... nd_noteworthy/wst-xml-1.0news.html
Previous Topic:Compiled JSP
Next Topic:XML editor content assistor problem with multiple schemas
Goto Forum:

Current Time: Sun May 20 14:12:55 GMT 2018

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

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

Back to the top