Skip to Content.
Sympa Menu

mace-opensaml-users - RE: Detecting "xsi:nil" in AttributeValue

Subject: OpenSAML user discussion

List archive

RE: Detecting "xsi:nil" in AttributeValue


Chronological Thread 
  • From: "Scott Cantor" <>
  • To: <>
  • Subject: RE: Detecting "xsi:nil" in AttributeValue
  • Date: Thu, 13 Mar 2008 11:30:01 -0400
  • Organization: The Ohio State University

> In my case, AttributeValue directly extends ElementProxy, which
> is my "any" interface. That interface, among others, will probably get a
nil
> flag, though I would need to check that. If "xs:any" doesn't imply
nillable,
> I'll probably put it on the AttributeValue class as you imply.

Best I can tell, anyType is not nillable, so I think in SAML it would only
be the AttributeValue element that would get the flag.

For me that works because by default, if there's no xsi:type set, the the
AttributeValue builder gets used, which creates an instance that implements
AttributeValue, which would have the nil flag and correctly expose it.

If xsi:type were set, whatever the builder ends up being would have to
instantiate a class that might or might not be nillable. In my case,
attributes that show up that aren't legal cause an exception, so if you
tried to pass in xsi:nil for anything that didn't allow it, you'd get an
error.

So in short I think in my case it is the individual base class that needs
the flag, just as it would be for xml:lang. It's a standard attribute,
except that my schema validators have to be aware of it and check for it.

It's a small change for me, so I'll take care of it. I can't say what the
impact is in Java, I don't know what builder gets used by default for a bare
AttributeValue.

-- Scott





Archive powered by MHonArc 2.6.16.

Top of Page