RE: Attribute values or the lack therof

From
Scott Cantor <>
Date
2003-09-03T05:32:02+00:00
ID
003b01c371df$99a8fb60$6401a8c0@SAIDIN
Thread
RE: Attribute values or the lack therof
The thing to keep in mind is, AttributeValue isn't a string. It's anyType.
So an empty element isn't a zero length string, it's just an empty simple
value.

> One option that just occurred to me that we didn't consider 
> during implementation - since the AttributeValue is defined 
> as type xsd:anyType, it seems to me that we should have 
> defined an element in our namespace to represent no-value.  
> Something like so:
> 
> <AttributeValue><null 
> xmlns="http://www.learningstation.com/services/security/SAML" 
> xsi:nil="true" /></AttributeValue>

You can also simply type AttributeValue itself as the empty type you ascribe
to <null> above:

<xs:type name="EmptyType">
	<xs:complexType>
		<xs:sequence/>
	</xs:complexType>
</xs:type>

<AttributeValue xsi:type="EmptyType"/>

In Shibboleth, we defined a sort of "uber-type" for attributes that permits
a mixed and open content model, including emptiness. We assign that type to
all AttributeValue elements. It also looks like an empty string, but it's
not.

The other advantage is that it basically lets us laxly validate just that
element.

It's more or less what XACML attributes look like, and I'd hope we adopt
something similar to fix some of the strictness in SAML.

-- Scott