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: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
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)?