Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Evaluate addition of gtin12 #122
Notes from Mark Harrison,
"""According to http://www.gs1.org/barcodes/technical/idkeys/gtin there are four GTIN formats currently in use with linear bar codes, namely GTIN-8, GTIN-12, GTIN-13 and GTIN-14. GTIN-12 is synonymous with the 12-digit UPC barcode (UPC-12) in use in the USA. I think Canada might also use the GTIN-12 - not 100% sure. GTIN-13 is synonymous with the 13-digit EAN-13 barcode in use in Europe and most of the rest of the world.
Any GTIN-8, GTIN-12, GTIN-13 can be represented as a consistent 14-digit GTIN-14 by left-padding with leading zeros, e.g. '000000' concatenated with a GTIN-8, '00' concatenated with a GTIN-12, '0' concatenated with a GTIN-13.
gtin12 is no less important than gtin13, so if you already have schema.org properties for gtin8, gtin13 and gtin14, then I see no valid reason not to define a gtin12 property directly, for completeness, rather than coerce people to use a schema:gtin13 property.
Internally within consumers of schema.org the application logic should probably consider the GTIN-14 to be the canonical format. This means that the following RDF triples should be considered identical and refer to the same GTIN:
X schema:gtin12 "614141123452" .
However, note that the GTIN-14 has as its initial digit an Indicator Digit, which is not always zero. This means that there can be GTIN-14 identifiers for which there is no direct GTIN-13 or GTIN-12 equivalent, especially when the indicator digit is non-zero."""
The range of GTIN is sufficiently narrow that creating a Datatype for each would seem like a good idea. At least this would allow validators to determine if the values are reasonable, without needing to special code each property. These datatypes could have a description including a regular expression that can be used to match, if not an
Given that, it might be useful to have a
referenced this issue
Jan 22, 2015
I've sketched a bland definition and mailed GS1 + W3C schema.org CG folk for advice -> https://lists.w3.org/Archives/Public/public-schemaorg/2015Apr/0038.html