Presented here is a short but complete TRD example, divided by comments about the specific elements.

Header

<?xml version="1.0" encoding="UTF-8"?> 
<TRDef id="GenericProduction" version="3.0" defaultType="Product" xmlns="http://www.tracetracker.com/trd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.tracetracker.com/trd http://schema.tracetracker.com/ttTRD_5_0.xsd">

TRDef declares a TRD. id identifies the name of the TRD but does not need to be unique. Version is any string of characters shorter than 8 and serves no other function than as a help for the user. defaultType refers to a tradeUnitType which will be used when importing EPCIS data that does not include a TRD type for a created EPC. TIX version 5 and prior supported multiple TRDs but this support will be discontinued.

 

 <Label> 
<Text xml:lang="en">Generic production TRD</Text>

<Text xml:lang="no">TRD for generisk produksjon</Text>
</Label>
<Description>
<Text xml:lang="en">Definitions related to generic production of goods.</Text>
<Text xml:lang="no">Definisjoner relatert til generisk produksjon av varer.</Text>
</Description>

Label and description for the TRD. Any number of localized labels and descriptions may be added.

<PropertyTypes defaultEpcisNamespace="http://www.globaltraceability.net/schema/epcis">
<PropertyType format="REAL" id="weight" unit="kilogram" epcisNamespace="http://www.tracetracker.com/schema/epcistest">
<Label>
<Text xml:lang="en">Dry weight</Text>
<Text xml:lang="no">Tørrvekt</Text>
</Label>
<Description>
<Text xml:lang="en">Measured or estimated dry weight.</Text>
<Text xml:lang="no">Målt eller estimert tørrvekt.</Text>
</Description>
</PropertyType>
</PropertyTypes>

Declaration of a property type. Property types may have their own epcisNamespace declared. The default is used if not. The property type has a name “weight” which is used when entities are declared with that property. The PropertyType is of the format REAL which is used for real numbers. unit=“kilogram” is a default unit and is used if no unit is specified for property values of this type. The fact that the default unit is a weight based unit, only weight based units may be used for property values. i.e lbs or tonnes. As with the TRD name the PropertyType has been given a label and description in two languages.

 

 <TradeUnitTypes>
<TradeUnitType id="Product" tradeunit-class="basic">
<Label>
<Text xml:lang="en">Product</Text>
</Label>
<PropertyRef id="weight" occurrence="required" />
</TradeUnitType>
</TradeUnitTypes>
</TRDef>

Declares a TradeUnitType named "Product" that has an english label "Product" and a required property weight. When registering ttData in the Navigator a TradeUnit of the type Product is required to have a weight for the input to be accepted.