WGBH / PBCore2.0

Public Broadcasting Metadata Dictionary Project
http://www.pbcore.org
32 stars 9 forks source link

R5: Adjust language regex to allow for empty <language> elements. #8

Closed pdpinch closed 14 years ago

pdpinch commented 14 years ago

With PBCore 1.3 an empty language element, such as will product a schema validation error:

element language: Schemas validity error : Element '{http://www.pbcore.org/PBCore/PBCoreNamespace.html}language': [facet 'pattern'] The value '' is not accepted by the pattern '[a-z]{3}((;[a-z]{3})?)*'

pdpinch commented 14 years ago

Fixed in initial commit, 5d0e20eabf4a35d9968d4d525d95f85f26990c45

  <xsd:restriction base="xsd:string">
     <xsd:pattern value="([a-z]{3}((;[a-z]{3})?)*)?"/>
WeAreAVP commented 13 years ago

With this element it seems that the author of the documentation shaped how the schema would be written by recommending the use of semicolon delimiters. This is an odd XML habit, should we just change this to maxOccurs="unbounded" rather than keep up the use of the semicolon delimiters. Also since language can now have a source and version attribute does this mean that other language standard may be used, such as ISO 639-1, like "en-us", because right now the attributes seem to imply that the standard may be selected but the regex requires only standards that use three letter characters (iso 639-2, 639-3).

jackbrighton commented 13 years ago

Why the semicolon delimiter? This is the only place in the schema I see this. A typo maybe?