The structure of the mapping file is quite simple. Each file contains a list of mapping nodes. A mapping node exists for each ticket item in the default PRISMAdirect ticket. PRISMAdirect contains different types of ticket items: "Number", "Yes/no", "Text", "Date", "Choice" and "Lookup" items. Therefore, several types of mapping nodes are required to map the different types of ticket items successfully:
Type |
Description |
---|---|
NumberMapping |
Used for ticket items of type "Number". |
DateMapping |
Used for ticket items of type "Date". |
TextMapping |
Used for ticket items of type "Text". |
EnumMapping |
Used for ticket items of type "Choice" and "Lookup" when one option offers a list of values. |
ConditionalEnumMapping |
Used for ticket items of type "Choice" and "Lookup" when a condition determines which options and values become available for the item. For example, if you enable delivery, then you can select a delivery method. |
BooleanMapping |
Used for ticket items of type "Yes/no". |
TimeSpanMapping |
Used for ticket items that contain a date + start time and a date + end time, e.g. the finishing time, or the prepare time. |
MediaMapping |
|
<?xml version="1.0" encoding="utf-8"?>
<jc:Mappings SchemaVersion="1.0" AttachmentPath="/jdf:JDF/jdf:ResourcePool/jdf:LayoutElement/jdf:FileSpec/@URL" xmlns:jc="oce-com-pa-jc">
...
</jc:Mappings>
The attributes of the header are:
Attribute |
Description |
---|---|
SchemaVersion |
XML Schema 1.0 is used to describe the structure of XML documents. |
AttachmentPath |
The location of the PDF resource which must be linked to the PRISMAdirect job |
xmlns:jc |
The declaration of a namespace. A namespace is a set of names in which all names are unique. |
All mapping nodes contain at least three mandatory attributes. However, all nodes can contain one or more conditions. In this example, the following node only contains the three mandatory attributes.
<jc:NumberMapping Name="Copies" Optional="true">
<jc:JdfField XPath="/jdf:JDF/jdf:ResourceLinkPool/…/@Amount"/>
</jc:NumberMapping>
The result of this mapping node is:
The ticket item Copies of PRISMAdirect receives the value of the JDF ticket item Amount.
The mandatory attributes are explained here for all mapping nodes:
Attribute |
Description |
---|---|
Name |
The name of a PRISMAdirect ticket item. This ticket item receives the value of the associated JDF ticket item. The value of the JDF ticket item is retrieved by an XPath expression. |
Optional |
|
XPath |
The XPath expression is an essential attribute in each mapping node. The XPath expression points to an item in the JDF ticket that must be mapped to the PRISMAdirect ticket item. Every mapping node must contain at least one XPath expression. In this example, the expression XPath="/jdf:JDF/jdf:ResourceLinkPool/…/@Amount" retrieves the value of the JDF ticket item Amount. |
The NumberMapping node is a simple node. It contains only the three mandatory attributes.
<jc:NumberMapping Name="Copies" Optional="true">
<jc:JdfField XPath="/jdf:JDF/jdf:ResourceLinkPool/…/@Amount"/>
</jc:NumberMapping>
Attribute |
Description |
---|---|
Name Optional XPath |
See section "The three mandatory attributes" for an explanation of the mandatory attributes of this node. |
Limitation
The retrieved value must be valid for PRISMAdirect. Else, the value is not applied to the PRISMAdirect ticket item. For example:
The ticket item "Copies" is a number item and can therefore only receive a numeric value. Text such as “John Doe” is not allowed.
The item can have constraints on the minimum and maximum values as defined in the "Product & order editor" workspace. If the value in the JDF ticket item is outside these boundaries, it cannot be set in the PRISMAdirect ticket item.
The DateMapping node is a simple node. It contains only the three mandatory attributes.
<jc:DateMapping Name="Date" Optional="true">
<jc:JdfField XPath="/jdf:JDF/jdf:ResourcePool/…/@LastEnd"/>
</jc:DateMapping>
Attribute |
Description |
---|---|
Name Optional XPath |
See section "The three mandatory attributes" for an explanation of the mandatory attributes of this node. |
Limitation
PRISMAdirect tries to convert the string obtained from the JDF ticket item into a valid date. If successful, the value is assigned to a PRISMAdirect ticket item of type "Date".
The TextMapping node can contain a number of optional attributes in addition to the three mandatory attributes.
<jc:TextMapping Prefix="Address:" Name="Location" Optional="true" Separator=",">
<jc:JdfField XPath="/jdf:JDF/jdf:ResourcePool/…/jdf:Address/@Street"/>
<jc:JdfField XPath="/jdf:JDF/jdf:ResourcePool/…/jdf:Address/@City"/>
<jc:JdfField XPath="/jdf:JDF/jdf:ResourcePool/…/jdf:Address/@PostalCode"/>
</jc:TextMapping>
Attribute |
Description |
---|---|
Name Optional XPath |
See section "The three mandatory attributes" for an explanation of the mandatory attributes of this node. |
XPath |
The TextMapping node can contain more than one XPath expression. |
Prefix |
Put a prefix in the PRISMAdirect ticket item in front of the value retrieved from the JDF ticket item. In this example, the prefix is "Address:". |
Separator |
Specify a separator when the node contains more than one XPath attribute. Each XPath attribute contains one value, therefore more than one value is retrieved from the JDF ticket. In this example, the separator is a comma: "," |
Limitation
The retrieved value must be valid for PRISMAdirect. Else, the value is not applied to the PRISMAdirect ticket item. For example:
The item can have constraints on the maximum number of characters as defined in the "Product & order editor" workspace. If the value in the JDF ticket item is longer than the maximum number of characters, it cannot be set in the PRISMAdirect ticket item.
The EnumMapping node always contains specific attributes in addition to the three mandatory attributes.
<jc:EnumMapping Name="DocumentMediaWeight" Optional="true">
<jc:JdfField XPath="/jdf:JDF/jdf:ResourcePool/…/@Weight"/>
<jc:EnumValueMapping JdfValue="65"AccessEnumValue="65032gram047m2"/>
<jc:EnumValueMapping JdfValue="80"AccessEnumValue="80032gram047m2"/>
<jc:EnumValueMapping JdfValue="90"AccessEnumValue="90032gram047m2"/>
<jc:EnumValueMapping JdfValue="100"AccessEnumValue="100032gram047m2"/>
<jc:EnumValueMapping JdfValue="120"AccessEnumValue="120032gram047m2"/>
<jc:EnumValueMapping JdfValue="160"AccessEnumValue="160032gram047m2"/>
<jc:EnumValueMapping JdfValue="170"AccessEnumValue="170032gram047m2"/>
</jc:EnumMapping>
The EnumMapping node contains a list of EnumValueMapping nodes for each of the possible values for the option in the choice /lookup ticket item of PRISMAdirect:
Attribute |
Description |
---|---|
Name Optional XPath |
See section "The three mandatory attributes" for an explanation of the mandatory attributes of this node. |
JdfValue |
This attribute contains one of the possible values of the concerning JDF ticket item at the specified XPath. |
AccessEnumValue |
This attribute contains the corresponding value of the option in the PRISMAdirect ticket item. |
PRISMAdirect retrieves the JDF ticket item using the specified XPath expression. PRISMAdirect parses the EnumValueMapping nodes to find the JdfValue attribute that is equal to the value taken from the JDF ticket. When the node is found, the value of the AccessEnumValue attribute is set in the PRISMAdirect ticket item specified by the Name attribute.
For example, the value retrieved from the JDF ticket is "100" for the JDF ticket item Weight. PRISMAdirect sets the value of the ticket item DocumentMediaWeight to "100032gram047m2".
Limitation
The value retrieved from the JDF ticket must be available in one of the EnumValueMapping nodes. If it is not available, no value can be set in the PRISMAdirect ticket item.
The ConditionalEnumMapping node always contains specific attributes in addition to the three mandatory attributes.
<jc:ConditionalEnumMapping Name="BindingMethod" Optional="true">
<jc:ConditionalEnumValue AccessEnumValue="SaddleStitch">
<jc:StringCondition JdfField="/jdf:JDF/jdf:ResourcePool/jdf:StitchingParams/@StitchType"ExpectedValue="Saddle"/>
<jc:StringCondition JdfField="/jdf:JDF/jdf:ResourcePool/jdf:StitchingParams/@NumberOfStitches" ExpectedValue="2"/>
</jc:ConditionalEnumValue>
<jc:ConditionalEnumValue AccessEnumValue="Staples_1">
<jc:StringCondition JdfField="/jdf:JDF/jdf:ResourcePool/jdf:StitchingParams/@NumberOfStitches" ExpectedValue="1"/>
</jc:ConditionalEnumValue>
<jc:ConditionalEnumValue AccessEnumValue="Staples_2">
<jc:StringCondition JdfField="/jdf:JDF/jdf:ResourcePool/jdf:StitchingParams/@NumberOfStitches" ExpectedValue="2"/>
</jc:ConditionalEnumValue>
....
</jc:ConditionalEnumMapping
The ConditionalEnumMapping node contains one ConditionalEnumValue node for each option in the choice/lookup ticket item of PRISMAdirect specified in by the attribute Name.
Attribute |
Description |
---|---|
Name Optional XPath |
See section "The three mandatory attributes" for an explanation of the mandatory attributes of this node. |
AccessEnumValue |
This attribute represents one of the options of the choice item. |
One or more conditions |
See section "Conditions" below. |
PRISMAdirect parses the ConditionalEnumValue nodes. For each node it evaluates the conditions. If all conditions in one ConditionalEnumValue node are met:
The parsing stops
PRISMAdirect sets the value of the PRISMAdirect ticket item with the value of the corresponding AccessEnumValue attribute.
The BooleanMapping node always contains specific attributes in addition to the three mandatory attributes.
<jc:BooleanMapping Name="Collate" Optional="true" EvaluateTo="false">
<jc:StringCondition JdfField="/jdf:JDF/…/@Collate" ExpectedValue="None"/>
<jc:StringCondition JdfField="/jdf:JDF/@Types" ContainedValue="DigitalPrinting"/>
</jc:BooleanMapping>
Attribute |
Description |
---|---|
Name Optional XPath |
See section "The three mandatory attributes" for an explanation of the mandatory attributes of this node. |
One or more conditions |
See section "Conditions" below. |
EvaluateTo |
This attribute specifies the value for the PRISMAdirect ticket item as a result of the evaluation of the optional conditions. The values for EvaluateTo can be "true" or "false". |
PRISMAdirect evaluates the conditions. If all conditions are met, the PRISMAdirect ticket item specified by the Name attribute receives the value of the EvaluateTo attribute.
For example, for the above mapping node, if both string conditions are met, the Collate ticket item receives the value "false". Else, the ticket item receives the value "".
The TimeSpanMapping node always contains specific attributes in addition to the three mandatory attributes.
<jc:TimeSpanMapping Name="FinishingTime" Optional="true">
<jc:TimeSpan Start="/jdf:JDF/jdf:AuditPool/…/@Start"
End="/jdf:JDF/jdf:AuditPool/…/@End"/>
</jc:TimeSpanMapping>
Attribute |
Description |
---|---|
Name Optional XPath |
See section "The three mandatory attributes" for an explanation of the mandatory attributes of this node. |
Start |
This attribute retrieves a date and time at the specified XPath. This is the start date for the time span. |
End |
This attribute retrieves a date and time at the specified XPath. This is the end date for the time span. |
PRISMAdirect computes the difference in time between the two values. The result is a time span which is set as the value of the PRISMAdirect ticket item specified by the Name attribute.
PRISMAdirect only supports jobs using one type of media for the document and one type of media for the cover. The document media and the cover media can be different. Media is defined by four properties:
Media color
Media type
Media weight
Media size
The mapping file contains eight nodes to retrieve the media properties:
Four nodes to retrieve the properties of the document media
Four nodes to retrieve the properties of the cover media
Two types of mapping nodes are used to exclusively map media attributes:
MediaEnumMapping
Used exclusively for media ticket items when one option offers a list of values. For example, the colour of a media.
MediaConditionalEnumMapping
Used exclusively for media ticket items when a condition determines which options and values become available for the item. For example, when the media is A4 and booklet, then....
Example of the MediaEnumMapping node to retrieve the media colour:
<jc:MediaEnumMapping Name="CoverMediaColor" Optional="true">
<jc:JdfField XPath="/jdf:JDF/…/jdf:Media[@ID='${MediaID}']/@MediaColorName"/>
<jc:EnumValueMapping JdfValue="White" AccessEnumValue="White"/>
<jc:EnumValueMapping JdfValue="Blue" AccessEnumValue="Blue"/>
<jc:EnumValueMapping JdfValue="Black" AccessEnumValue="Black"/>
</jc:MediaEnumMapping>
Example of the MediaConditionalEnumMapping node to retrieve the media size:
<jc:MediaConditionalEnumMapping Name="DocumentMediaSize" Optional="true">
<jc:ConditionalEnumValue AccessEnumValue="A0">
<jc:NumericCondition ExpectedValue="2383.9344" JdfField="/jdf:JDF/…/jdf:Media[@ID='${MediaID}']/@Dimension[0]"/>
<jc:NumericCondition ExpectedValue="3370.392" JdfField="/jdf:JDF/…/jdf:Media[@ID='${MediaID}']/@Dimension[1]"/>
</jc:ConditionalEnumValue>
<jc:ConditionalEnumValue AccessEnumValue="A0">
<jc:NumericCondition ExpectedValue="2383.9344" JdfField="/jdf:JDF/…/jdf:Media[@ID='${MediaID}']/@Dimension[1]"/>
<jc:NumericCondition ExpectedValue="3370.392" JdfField="/jdf:JDF/…/jdf:Media[@ID='${MediaID}']/@Dimension[0]"/>
</jc:ConditionalEnumValue>
</jc:MediaConditionalEnumMapping>
Attribute |
Description |
---|---|
Name Optional XPath |
See section "The three mandatory attributes" for an explanation of the mandatory attributes of this node. |
MediaEnumMapping node |
The MediaEnumMapping node uses the same structure as the EnumMapping node described above. See the EnumMapping node for:
|
MediaConditionalEnumMapping node |
The MediaConditionalEnumMapping uses the same structure as the ConditionalEnumMapping node described above. See the ConditionalEnumMapping node for:
|
The XPath in the JdfField retrieves the ID of the media using [@ID='${MediaID}'].
The mapping file can contain the Type attribute and the MediaPartitioner for the MediaEnumMapping node and the MediaConditionalEnumMapping node. However, these attributes are obsolete and are not used by PRISMAdirect.
All nodes can contain one or more conditions. PRISMAdirect accepts the following conditions:
StringCondition
For example:
<jc:StringCondition JdfField="/jdf:JDF/jdf:ResourcePool/jdf:StitchingParams/@StitchType" ExpectedValue="Saddle"/>
or
<jc:StringCondition JdfField="/jdf:JDF/jdf:ResourcePool/jdf:StitchingParams/@StitchType" ContainedValue="Saddle"/>
NumericCondition
For example:
<jc:NumericCondition JdfField="/jdf:JDF/jdf:ResourcePool/jdf:StitchingParams/@NumberOfStitches" ExpectedValue="2"/>
or
<jc:NumericCondition JdfField="/jdf:JDF/jdf:ResourcePool/jdf:StitchingParams/@NumberOfStitches" ContainedValue="2"/>
NumericComparisonCondition
For example:
<jc:NumericComparisonCondition Value_1="/jdf:JDF/jdf:ResourcePool/jdf:Media/@Dimension[0]" Value_2="/jdf:JDF/jdf:ResourcePool/jdf:Media/@Dimension[1]" Comparison="LessThan"/>
The attributes for the StringCondition and NumericCondition are:
Attribute |
Description |
---|---|
JdfField |
The XPath expression points to an item in the JDF ticket. The value of the item is used in the condition. ![]() Both the StringCondition and the NumericCondition can be used without an ExpectedValue or a ContainedValue attribute. In this case, the condition is met when the JdfField exists in the JDF ticket. |
ExpectedValue |
The value of JdfField is compared to the value of ExpectedValue.
|
ContainedValue |
The value of JdfField is compared to the value of ContainedValue. The condition is met when the value of ContainedValue is part of the value of JdfField. For example: <jc:StringCondition JdfField="/jdf:JDF/@Types" ContainedValue="Layout"/>. The condition is met when JdfField contains at least the string value as defined by ContainedValue. In this example, all string values that contain "Layout" are accepted, e.g. "Layout", "LayoutPreparation", etc. |
The attributes for the NumericComparisonCondition are:
Attribute |
Description |
---|---|
Value_1 |
The XPath expression points to an item in the JDF ticket. The value of the item is used in the condition. |
Value_2 |
The XPath expression points to an item in the JDF ticket. The value of the item is used in the condition. |
Comparison |
The value of Value_1 is compared to the value of Value_2. The condition is met when the statement in Comparison is true. The values of the Comparison attribute can be:
For example: Value_1 = 3, Comparison = LessThan and Value_2 = 7. In this example, the condition is met. |