Creating Schema and Sample Data
Use sample data source information for developing your RTF report templates, defining bursting, and mapping your PDF templates.
Storing the sample data file in PeopleTools provides a means to:
-
Insert form field tags in RTF templates
-
Conduct PDF mapping.
-
Choose the bursting field during design time.
-
Preview the template.
Sample Data File
Requirements for the structure of XML sample data file include:
-
Must consist of a root node with one repeating group.
Textual elements in this repeating group are candidates for bursting.
-
Elements should have textual content.
Element should not be empty.
-
All expected elements must be included.
All text elements should contain default values. All defined elements can be used for mapping.
This is an example of a sample XML file used as a data source:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<taxroot>
<Box_Year>2005</Box_Year>
<Box_Form>W2</Box_Form>
<EE_SSN>111-11-1111</EE_SSN>
<ER_EIN>ER_111111111</ER_EIN>
<Employee>
<EE_FirstName>Incheol</EE_FirstName>
<EE_LastName>Kang</EE_LastName>
<EE_Address1>500 Oracle Parkway</EE_Address1>
<EE_Address2>Redwood Shores</EE_Address2>
<EE_Address3>CA 94065</EE_Address3>
</Employee>
<Employer>
<ER_Name>Oracle USA</ER_Name>
<ER_Address1>500 Oracle Parkway</ER_Address1>
<ER_Address2>Redwood Shores</ER_Address2>
<ER_Address3>CA 94065</ER_Address3>
</Employer>
<Tax>
<Fed_Wages_COR>20000</Fed_Wages_COR>
<Fed_Tax_COR>20000</Fed_Tax_COR>
<RETIRE_EE_PRV>Y</RETIRE_EE_PRV>
</Tax>
</taxroot>
</root>
Note:
In this example, the elements Box_Form, Box_Year, EE_SSN and ER_EIN are available as burst candidates. All of the elements will be available for mapping.
The actual data file may contain repeated instances of the high level repeating group, as shown in this example:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<taxroot>
<Box_Year>2005</Box_Year>
<Box_Form>W2</Box_Form>
<EE_SSN>111-11-1111</EE_SSN>
<ER_EIN>ER_111111111</ER_EIN>
<Employee>
<EE_FirstName>Incheol</EE_FirstName>
<EE_LastName>Kang</EE_LastName>
<EE_Address1>500 Oracle Parkway</EE_Address1>
<EE_Address2>Redwood Shores</EE_Address2>
<EE_Address3>CA 94065</EE_Address3>
</Employee>
<Employer>
<ER_Name>Oracle USA</ER_Name>
<ER_Address1>500 Oracle Parkway</ER_Address1>
<ER_Address2>Redwood Shores</ER_Address2>
<ER_Address3>CA 94065</ER_Address3>
</Employer>
<Tax>
<Fed_Wages_COR>20000</Fed_Wages_COR>
<Fed_Tax_COR>20000</Fed_Tax_COR>
<RETIRE_EE_PRV>Y</RETIRE_EE_PRV>
</Tax>
</taxroot>
<taxroot>
<Box_Year>2005</Box_Year>
<Box_Form>W2</Box_Form>
<EE_SSN>2222-22-2222</EE_SSN>
<ER_EIN>ER_222222222</ER_EIN>
<Employee>
<EE_FirstName>Chang</EE_FirstName>
<EE_LastName>Yu</EE_LastName>
<EE_Address1>500 Oracle Parkway</EE_Address1>
<EE_Address2>Redwood Shores</EE_Address2>
<EE_Address3>CA 94065</EE_Address3>
</Employee>
<Employer>
<ER_Name>Oracle USA</ER_Name>
<ER_Address1>500 Oracle Parkway</ER_Address1>
<ER_Address2>Redwood Shores</ER_Address2>
<ER_Address3>CA 94065</ER_Address3>
</Employer>
<Tax>
<Fed_Wages_COR>10000</Fed_Wages_COR>
<Fed_Tax_COR>10000</Fed_Tax_COR>
<RETIRE_EE_PRV>Y</RETIRE_EE_PRV>
</Tax>
</taxroot>
</root>
Schema File
This is the sample schema for the XML file shown previously:
<?xml version="1.0"?>
<xs:schema id="root" targetNamespace="http://tempuri.org/example_xml.xsd"
xmlns:mstns="http://tempuri.org/example_xml.xsd"
xmlns="http://tempuri.org/example_xml.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault=
"qualified">
<xs:element name="root" msdata:IsDataSet="true"
msdata:EnforceConstraints="False">
<xs:complexType>
<xs:choice maxOccurs="unbounded">
<xs:element name="taxroot">
<xs:complexType>
<xs:sequence>
<xs:element name="Box_Year" type="xs:string" minOccurs="0"/>
<xs:element name="Box_Form" type="xs:string" minOccurs="0"/>
<xs:element name="EE_SSN" type="xs:string" minOccurs="0"/>
<xs:element name="ER_EIN" type="xs:string" minOccurs="0"/>
<xs:element name="Employee" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="EE_FirstName" type="xs:string"
minOccurs="0"/>
<xs:element name="EE_LastName" type="xs:string"
minOccurs="0"/>
<xs:element name="EE_Address1" type="xs:string"
minOccurs="0"/>
<xs:element name="EE_Address2" type="xs:string"
minOccurs="0"/>
<xs:element name="EE_Address3" type="xs:string"
minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Employer" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="ER_Name" type="xs:string" minOccurs="0"/>
<xs:element name="ER_Address1" type="xs:string"
minOccurs="0"/>
<xs:element name="ER_Address2" type="xs:string"
minOccurs="0"/>
<xs:element name="ER_Address3" type="xs:string"
minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Tax" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="Fed_Wages_COR" type="xs:string"
minOccurs="0"/>
<xs:element name="Fed_Tax_COR" type="xs:string"
minOccurs="0"/>
<xs:element name="RETIRE_EE_PRV" type="xs:string"
minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Note:
Schema and sample data are generated for the PeopleSoft Query data source.