5.0 Using Profiles in Statements
Using an introduced Concept, such as an activity type, verb, attachment usage type, extension, activity, or document resource, can be done freely, provided the defined usage and meaning are adhered to. But a Learning Record Provider can go further, and make sure to adhere to Profile-described Statement Templates and Patterns. Learning Record Providers authoring Statements that conform to matching Profile-described Statement Templates and Patterns SHOULD include the most up-to-date conformant Profile version as a category context activity with id equal to the version's id
in those Statements, and Statements containing a Profile version as a category context activity MUST conform to any matching Statement Templates and Patterns that Profile version describes. An LRP is effectively declaring conformance to a specific Profile version BY including the category context activity with that Profile version's id
. There is no other mechanism defined in this document that links a Statement to a particular xAPI Profile. However, not every category context activity has a specific xAPI Profile, it might simply be an activity id.
7.1 Verbs, Activity Types, Category Context Activities and Attachment Usage Types
Verb, Activity Type, and Attachment Usage Type Concepts share the same properties. They're all Concepts that make sense to relate semantically to others of the same type, such as indicating one is a narrower form of another.
Verb, Activity Type, Category Context Activities, and Attachment Usage Type Concepts share the same properties. They're all Concepts that make sense to relate semantically to others of the same type, such as indicating one is a narrower form of another. Category Context Activities were not included in the previous version, but is expected that the Category Context Activity corresponding to the xAPI Profile would be a reserved term for that xAPI Profile, but would still be considered a concept. Use of Category Context Activities also allows the "reserving" or "sub-profiling" where a full xAPI Profile may not be created, but the use of a "tag" is needed within a profile. A Profile Creator SHOULD include the Category Context Activity corresponding to the xAPI Profile, versioning as appropriate, in its list of Concepts.
-
related
MUST only be used on Concepts that are deprecated to indicate possible replacement Concepts in the same Profile, if there are any. -
relatedMatch
SHOULD be used to connect possible replacement Concepts to removed Concepts from previous versions of the same Profile, and for possible replacement Concepts in other Profiles of deprecated Concepts, as well as other loose relations. -
exactMatch
SHOULD be used rarely, mostly to describe connections to vocabularies that are no longer managed and do not use good URLs.
8.0 Statement Templates
A Statement Template describes one wayhow Statements following the Profile mayMUST be structured.
Property | Type | Description | Required |
---|---|---|---|
id |
A URI for this Statement Template. | Required | |
type |
StatementTemplate |
Required | |
inScheme |
The IRI of the specific Profile version currently being described | Required | |
prefLabel |
Object | A Language Map of descriptive names for the Statement Template | Required |
definition |
Object | A Language Map of descriptions of the purpose and usage of the Statement Template | Required |
deprecated |
Boolean | A boolean, default false. If true, this Statement Template is deprecated. | Optional |
verb |
IRI | Verb IRI | Optional |
objectActivityType |
IRI | Object activity type IRI | Optional |
contextGroupingActivityType homepage
|
|
|
Optional |
contextParentActivityType activityDefinitionExtension key
|
|
|
Optional |
contextOtherActivityType resultExtension key
|
|
|
Optional |
contextCategoryActivityType contextExtension key
|
|
|
Optional |
attachmentUsageType contextCategoryContextActivity key
|
|
|
Optional |
objectStatementRefTemplate objectActivityType
|
|
|
Optional |
contextStatementRefTemplate contextGroupingActivityType
|
Array |
|
Optional |
rules contextParentActivityType
|
Array | Array of |
Optional |
contextOtherActivityType |
Array | Array of contextActivities other activity type IRIs | Optional |
contextCategoryActivityType |
Array | Array of contextActivities category activity type IRIs | Optional |
attachmentUsageType |
Array | Array of attachment usage type IRIs | Optional |
objectStatementRefTemplate |
Array | An array of Statement Template identifiers from this Profile version. | Optional |
contextStatementRefTemplate . |
Array | An array of Statement Template identifiers from this Profile version. | Optional |
rules |
Array | Array of Statement Template Rules | Optional |
A Statement Template MUST NOT have both objectStatementRefTemplate
and objectActivityType
.
The verb, object activity type, homepage, extensions, category context activity, attachment usage types, and context activity types listed are called Determining Properties.
A Profile Author MUST change a Statement Template's id
between versions if any of the Determining Properties, StatementRef properties, or rules change. Changes of scopeNote
are not considered changes in rules.
A Profile Author MUST change a Statement Template's id
between versions if any of the Determining Properties, StatementRef properties, or rules change. Changes of scopeNote
are not considered changes in rules. A Profile Author SHOULD create a Statement Template with a single Determining Property of the Category Context Activity Other Statement Templates MAY use the Category Context Activity of the intended xAPI Profile in combination with another Determining Property. In previous versions of this document, and if a Statement Template with a single Determining Property of the Category Context Activity is not included, All Statement Templates associated with this profile MUST consider that Category Context Activity as a Determining Property as it was an implicit requirement in previous versions.
A Learning Record Provider authoring a Statement following a Statement Template:
- MUST include all the Determining Properties in the Statement Template.
- MUST include all the Determining Properties in the Statement Template. A Statement Template using multiple Determining Properties is considered an "AND" operation.
- MUST follow all rules in the Statement Template.
- MUST, if
objectStatementRefTemplate
is specified, set the Statement object to a StatementRef with theid
of a Statement matching at least one of the specified Statement Templates. - MUST, if
contextStatementRefTemplate
is specified, set the Statement context Statement property to a StatementRef with theid
of a Statement matching at least one of the specified Statement Templates.
A Profile Validator validating a Statement MUST validate all the Learning Record Provider requirements for a Statement Template are followed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is something we can expand on in the WG. It may be valuable to support Statement Template(s) (and possibly Pattern(s)) category activities along side profile version.
If the group chooses to go this route, we'll probably want to define Activity Types for Profile Version, Statement Template and Pattern. The Activity Type would then become a requirement for these category activities.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per the July 19, 2022 - agree that establishing the author's intent for a Statement to conform to a profile, pattern, or Statement template within that Statement is appropriate and this is the correct/optimal mechanism to do so. Patterns and Statement Templates would not be mandatory, nor would the xAPI Spec reserve those activity types at this time (future versions very likely may). The author assertions do not alleviate the need for a Statement tagged with a profile to be matched against all applicable patterns and Statement templates.