AICC / CMI-5_Spec_Current

cmi5
http://adlnet.gov
Apache License 2.0
180 stars 91 forks source link

`langstring` not well specified #543

Open brianjmiller opened 7 years ago

brianjmiller commented 7 years ago

The course structure metadata has any number of fields that have a type of 'langstring'. And we generally show an example, such as:

<description>
  <langstring lang="en-US">This is a course description</langstring>
  <langstring lang="es-MX">Esta es una descripción del curso</langstring>
</description>

And the XSD checks the structure of the overall XML, but we don't specify anywhere (that I could find) the format of the lang attribute's value. In doing our implementation I assumed that it would match the languagePreference values which are specified as RFC 5646 values, and that is the IETF standard which I think we should follow. But to do so we'd need to be specific about it.

We recently had someone testing content that used the alternate format (using an underscore rather than a hyphen) and rejected that content. Without being specific in the text we'd essentially have to allow any string to be included as the value. That would cause problems with compatibility of cmi5 metadata being converted into xAPI Activity Definition data.

MrBillMcDonald commented 7 years ago

This was discussed at the June 30 meeting and the consensus was as follows:

The type xs:language is part of the XML XSD which references RFC 4646 (and its successors) which RFC 5656 is. So technically this is already correct.

The group agreed:

1 - The party in question implemented language incorrectly

2 - that it was not productive to define all the XML specification defined types.

3 - this should be added to "common mistakes" to document the issue so that we can direct others to it

MrBillMcDonald commented 7 months ago

Per Feb 23 meeting no action is required

https://www.w3.org/TR/xmlschema11-2/#language addresses the reference

[Definition:] language represents formal natural language identifiers, as defined by [BCP 47] (currently represented by [RFC 4646] and [RFC 4647]) or its successor(s). The ·value space· and ·lexical space· of language are the set of all strings that conform to the pattern