attribute filter RuleReference ?

Tom Zeller tzeller at dragonacea.biz
Tue Jul 16 12:16:14 EDT 2013


> I'm not sure I understand - what are you trying to insert into an Or?  The
> schema only allows PermitRuleRef DenyRuleRef, AttributeRuleRef and
> PolicyRuleRef.

<basic:Rule xsi:type="basic:OR">
  <basic:RuleReference ref="foo" />
  <basic:RuleReference ref="bar" />
</basic:Rule>

>> The method I tried was builder.addConstructorArgReference(), but
>> Spring throws a BeanCreationException :
>>
>> "Could not resolve matching constructor (hint: specify index/type/name
>> arguments for simple parameters to avoid type ambiguities)"
>
> That basically means you didn't give is a reference to a bean which hasn't
> been declared.  Something to watch out for is that names all have to go
> through #getAbsoluteReference() which does the uniqification inside the
> spring namespace.

Actually the problem was that I was attempting to add objects of
different classes to the bean definition builder, which was because my
test had something like :

<basic:Rule xsi:type="basic:OR">
  <basic:Rule xsi:type="... />
  <basic:RuleReference ref="bar" />
</basic:Rule>

which I believe is schema invalid :

<complexType name="OR">
  <complexContent>
   <extension base="afp:MatchFunctorType">
     <choice minOccurs="2" maxOccurs="unbounded">
       <element name="Rule" type="afp:MatchFunctorType" />
       <element name="RuleReference" type="afp:ReferenceType" />
     </choice>

which makes me wonder why I was able to parse an invalid schema.

Am I reading the schema correctly in that at least two elements of
either <Rule> or <RuleReference> are allowed, but not <Rule> and
<RuleReference>, correct ?


More information about the dev mailing list