occurrenceField Element

The occurrenceField element contains the schema information required to create a form field for adding new occurrence value of a specific type to a topic. The topic type is defined by the parent topicType element. The element has the following syntax:

<nf:occurrenceField id="..."
    minCardinality="MINCARD"
    maxCardinality="MAXCARD"
    datatype="DATATYPE"
    minValue="MIN"
    maxValue="MAX"
    valuePattern="PATTERN"
>
  <nf:subjectIdentifier> PSI </nf:subjectIdentifier>
  <nf:displayName> NAME </nf:displayName>
  <nf:extension ... > ... </nf:extension>
  ...
</nf:occurrenceField>
nf:occurrenceField/@id

Contains the ID of the occurrence type that gives rise to this occurrence field. If the schema is stored in a topic map in a TMCore database, then the value of this attribute is the OID of the topic that defines the occurrence type.

nf:occurrenceField/@minCardinality

Specifies the lower limit to the number of times an occurrence of this type should appear on an instance of the topic type. This attribute is REQUIRED and its value must be a non-negative integer.

nf:occurrenceField/@maxCardinality.

Specifies the upper limit to the number of occurrences of this type that should appear on an instance of the topic type. This attribute is REQUIRED and its value must be either a non-negative integer or the string "unbounded" to indicate that there is no upper limit.

nf:occurrenceField/@datatype

Specifies the datatype that the occurrence value must conform to. This attribute is OPTIONAL. The attribute value can be any string, but it is RECOMMENDED that only W3C XML Schema data types should be referenced, using the full URI for the datatype as defined by the W3C XML Schema specification.

nf:occurrenceField/@minValue

Specifies the minimum value that the occurrence value must match or exceed. This attribute is OPTIONAL and is only used when the datatype attribute has been defined and the data type referenced by the datatype attribute is a scalar attribute. The value of this attribute must conform to the lexical form of the data type specified by the datatype attribute.

nf:occurrenceField/@maxValue

Specifies the maximum value that the occurrence value must be less than or equal to. This attribute is OPTIONAL and is only used when the datatype attribute has been defined and the data type referenced by the datatype attribute is a scalar attribute. The value of this attribute must conform to the lexical form of the data type specified by the datatype attribute.

nf:occurrenceField/@valuePattern

Specifies the regular expression that the occurrence value must match. This attribute is OPTIONAL.

nf:occurrenceField/nf:subjectIdentifier

Contains a single subject identifier for the occurrence type. This element is OPTIONAL and REPEATABLE.

nf:occurrenceField/nf:displayName

Contains the human-readable display name for the occurrence type. This element is OPTIONAL and NON-REPEATABLE.

nf:occurrenceField/nf:extension

Contains a single NPCL schema extension value for the topic occurrence constraint that binds the occurrence type to this topic type or for the occurrence type itself. This element is OPTIONAL and REPEATABLE.

nf:occurrenceField/{##other}

An extension point in the NPCL Forms XML Schema which allows any number of elements from any namespace other than the NPCL Forms XML Schema namespace to appear as the last child elements of an occurrenceField element.