Using interactive templates
Each template has its own unique answer file, which contains the data that will be
used in the generated document. Within the <answer>
nodes are CDATA blocks that contain answer file XML for the given
template. Before developing your own input XML, you will need to make sure that you can
produce the answer file XML with the intended data.
The samples show three possible ways that the input XML might be implemented.
- Example A shows an overridden record. This record uses a different template, effective date, delivery option and one answer node.
- Example B shows a record with no overrides and multiple answer nodes, and would rely on information defined in the command line parameters.
- Example C
shows a record with an overridden
deliveryOption
and one answer node.
<?xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
batch
xmlns
="http://pb.com/EngageOne/batch-input
"
>
<records><!--
* Example A of an overridden record. This record uses a different template,effective date, and delivery option. *temp@name should be the logical path of the template --><template
name
="
EngageOne Template 2
"
version
="
1.0
"
/><deliveryOption
name
="
Only AFP
"
/>
<answer
id
="
1
"
> <![CDATA[ <InteractiveDataModel> <Publication> <String>EngageOne Scaling String</String> <Integer>1234</Integer> <Number>12345</Number> <Date>2008-10-08</Date> <DeliveryInformation> <Recipient /> <EmailToAddress /> <EmailFromAddress /> <EmailSubject /> <EmailBody /> <FaxNumber /> </DeliveryInformation> <g1private/> </Publication> </InteractiveDataModel> ]]> </answer> </records> <records> <!--Example B:Non-overridden records.--> <answer id="2"> <![CDATA[ <InteractiveDataModel> <Publication> <String>EngageOne Scaling String</String> <Integer>1234</Integer> <Number>12345</Number> <Date>2008-10-08</Date> <DeliveryInformation> <Recipient/> <EmailToAddress/> <EmailFromAddress/> <EmailSubject/> <EmailBody/> <FaxNumber/> </DeliveryInformation> <g1private/> </Publication> </InteractiveDataModel> ]]> </answer> <answerid="3"> <![CDATA[ <InteractiveDataModel> <Publication> <String>EngageOne Scaling String</String> <Integer>1234</Integer> <Number>12345</Number> <Date>2008-10-08</Date> <DeliveryInformation> <Recipient/> <EmailToAddress/> <EmailFromAddress/> <EmailSubject/> <EmailBody/> <FaxNumber/> </DeliveryInformation> <g1private/> </Publication> </InteractiveDataModel> ]]> </answer> <answer id="4"> <![CDATA[ <InteractiveDataModel> <Publication> <String>EngageOne Scaling String</String> <Integer>1234</Integer> <Number>12345</Number> <Date>2008-10-08</Date> <DeliveryInformation> <Recipient/> <EmailToAddress/> <EmailFromAddress/> <EmailSubject/> <EmailBody/> <FaxNumber/> </DeliveryInformation> <g1private/> </Publication> </InteractiveDataModel> ]]> </answer> </records> <records> <!--Example C:Another overridden record. This record specifies a different delivery option.-><deliveryOption
name
="
Only PDF
"
/>
<answer
id
="
5
"
>
<![CDATA[ <InteractiveDataModel> <Publication> <String>EngageOne Scaling String</String> <Integer>1234</Integer> <Number>12345</Number> <Date>2008-10-08</Date> <DeliveryInformation> <Recipient /> <EmailToAddress /> <EmailFromAddress /> <EmailSubject /> <EmailBody /> <FaxNumber /> </DeliveryInformation> <g1private/> </Publication> </InteractiveDataModel>]]>
</answer>
</records> </batch>
Before using your custom input XML files in your environment, you will need to use the schema below to validate the input XML. A copy of this XSD can also be found in your batch bundle installation at:
<Batch bundle installation folder>/bin/batch-input.xsd
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://pb.com/EngageOne/batch-input" targetNamespace="http://pb.com/EngageOne/batch-input"
elementFormDefault="qualified">
<xs:element name="batch">
<xs:complexType>
<xs:sequence>
<xs:element ref="records" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="records">
<xs:complexType>
<xs:sequence>
<xs:element ref="template" minOccurs="0" />
<xs:element ref="deliveryOption" minOccurs="0" />
<xs:element ref="answer" minOccurs="0" maxOccurs="unbounded" />
<xs:element ref="data" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="template">
<xs:complexType>
<xs:attribute name="effDate" type="xs:string" />
<xs:attribute name="name" type="xs:string" use="required" />
<xs:attribute name="version" type="xs:string" />
</xs:complexType>
</xs:element>
<xs:element name="deliveryOption">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="answer">
<xs:complexType mixed="true">
<xs:attribute name="id" type="xs:string" use="required" />
</xs:complexType>
</xs:element>
<xs:element name="data">
<xs:complexType mixed="true">
<xs:attribute name="file" type="xs:string" use="required" />
<xs:attribute name="startOfPublication" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:schema>