xsd:anyAttribute

An xsd:anyAttribute declaration is the attribute equivalent to the xsd:any wildcard element declaration described earlier. The main difference is that a single xsd:anyAttribute declaration indicates that any number of undeclared attributes may occur whereas xsd:any without a maxOccurs facet indicates that only a single wildcard element may occur at that position.

X.694 models xsd:anyAttribute as a SEQUENCE OF UTF8String in ASN.1. Each string in the sequence is expected to be in a name=‘value’ format. The generated C type for this is simply a linked list of character strings. For example:

   <xsd:complexType name="MyType">
      <xsd:anyAttribute processContents="lax"/>
   </xsd:complexType>

results in the following C type:

   typedef struct EXTERN MyType {
      /* List of const OSUTF8CHAR* */
      OSRTDList attr;
   } MyType;

To populate a variable of this type for encoding, one would add name=‘value’ strings to the list for each attribute. For example:

   MyType myVar;
   rtxDListInit (&myVar.attr);
   rtxDListAppend (&ctxt, &myVar.attr, OSUTF8(“attr1=‘value1’”));
   rtxDListAppend (&ctxt, &myVar.attr, OSUTF8(“attr2=‘value2’”));

and so on.