Doc-Tab Specification

The RequestedShipment contains a LabelSpecification that describes each zone on the Doc-Tab portion of the label by a DocTabZoneSpecification, located as follows:

RequestedShipment
…
LabelSpecification (LabelSpecification)
CustomerSpecifiedLabelDetail (CustomerSpecifiedLabelDetail)
    DocTabContent (DocTabContent)
DocTabContentType (DocTabContentType)
    Zone001 (DocTabContentZone001)
            DocTabZoneSpecifications[] (DocTabZoneSpecification)
ZoneNumber (positiveInteger)
Header (string)
            DataReference (string)
            LiteralValue (string)
            Justification (DocTabZoneJustificationType:string)

After identifying the zone number, the specification can indicate:

  • An optional header
  • Either a data reference (path to a request/reply element) or a literal value (actual data to be printed)
  • An optional justification

If both a data reference and literal value are passed, literal value takes precedence over data reference.

The data reference specifies a path to the element desired, based on a specific starting point:

  • Client detail data (ClientDetail)
  • Transaction detail data (TransactionDetail)
  • Request data for the entire shipment (RequestedShipment)
  • Request data for the current package (RequestedPackage)
  • Reply data for the entire shipment (CompletedShipment)
  • Reply data for the current package (CompletedPackage)

The path is made up of selectors, each of which specifies a step “into” the structure of the starting-point object. For single-valued (non-array) elements, the name of the element is the selector. All examples on the previous page used single-valued elements.

Array elements are qualified by a predicate that indicates which element of the array should be used, either by position or by content. Examples of this usage would be:

Shipper’s first street address line:

REQUEST/SHIPMENT/Shipper/Address/StreetLines[1]

Third-party number of shipment uploaded to FedEx InSight® system:

REQUEST/SHIPMENT/ShipmentContentRecords[3]/PartNumber

Shipment fuel surcharge:

REPLY/PACKAGE/RATE/PAYOR_ACCOUNT/Surcharges[SurchargeType="FUEL"]/Amount

There are few cases where array elements would be needed; the most likely scenario involves data (such as surcharges and taxes).

Example — ZoneNumber 1-8 specify data elements (using the XPath notation) and Zone 9 specifies a literal value.

<LabelSpecification>
<LabelFormatType>COMMON2D</LabelFormatType>
<ImageType>EPL2</ImageType>
<LabelStockType>STOCK_4X6.75_LEADING_DOC_TAB</LabelStockType>
<LabelPrintingOrientation>TOP_EDGE_OF_TEXT_FIRST</LabelPrintingOrientation>
<CustomerSpecifiedDetail>
<DocTabContent>
     <DocTabContentType>ZONE001</DocTabContentType>
         <Zone001>
             <DocTabZoneSpecifications>
                 <ZoneNumber>1</ZoneNumber>
                 <Header>Street</Header>
                 <DataField>REQUEST/SHIPMENT/Shipper/Address/StreetLines[1]</DataField>
             </DocTabZoneSpecifications>
             <DocTabZoneSpecifications>
                 <ZoneNumber>2</ZoneNumber>
                 <Header>Meter</Header>
                 <DataField>CLIENT/MeterNumber</DataField>
             </DocTabZoneSpecifications>
             <DocTabZoneSpecifications>
                 <ZoneNumber>3</ZoneNumber>
                 <Header>TransId</Header>
                 <DataField>TRANSACTION/CustomerTransactionId</DataField>
             </DocTabZoneSpecifications>
             <DocTabZoneSpecifications>
                 <ZoneNumber>4</ZoneNumber>
                 <Header>TotalSur</Header>
                 <DataField>REPLY/SHIPMENT/RATE/PAYOR_ACCOUNT/TotalSurcharges/Amount</DataField>
             </DocTabZoneSpecifications>
             <DocTabZoneSpecifications>
                 <ZoneNumber>5</ZoneNumber>
                 <Header>TotalWt</Header>
                 <DataField>REQUEST/SHIPMENT/TotalWeight/Value</DataField>
             </DocTabZoneSpecifications>
             <DocTabZoneSpecifications>
                 <ZoneNumber>6</ZoneNumber>
                 <Header>Date</Header><DataField>REQUEST/SHIPMENT/ShipTimestamp</DataField>
             </DocTabZoneSpecifications>
             <DocTabZoneSpecifications>
                 <ZoneNumber>7</ZoneNumber>
                 <Header>Contact</Header>
                 <DataField>REQUEST/SHIPMENT/Recipient/Contact/PersonName
</DataField>
             </DocTabZoneSpecifications>
             <DocTabZoneSpecifications>
                 <ZoneNumber>8</ZoneNumber>
                 <Header>Insured</Header>
                 <DataField>REQUEST/PACKAGE/InsuredValue/Amount</DataField>
             </DocTabZoneSpecifications>
             <DocTabZoneSpecifications>
                 <ZoneNumber>9</ZoneNumber>
                 <Header>Literal 1</Header>
                 <LiteralValue>mytext</LiteralValue>
             </DocTabZoneSpecifications>
         </Zone001>
</DocTabContent>
</CustomerSpecifiedDetail>
</LabelSpecification>

For an illustration of the Doc-Tab path syntax and VPath, see Path Syntax for DocTabHelper and VPath.