Creating Payroll XML Files
Every Payroll XML file must comply with the specifications
in the appropriate
Schema file. The fundamental
schema is PRL-GML20170101pxs.xsd.
This schema supercedes the previous schema PRL-GML20110324pxs.xsd.
The AASHTOWare Project™ Payroll XML Resource Kit focuses on building an XML file that complies
with the specifications in the schema. That is necessary in order
for an agency to be able to use the XML file at all. However, there
are usually going to be other requirements, in addition to full
compliance with the schema, that a Payroll XML file must meet
in order for an agency to use it.
There are two aspects of payroll data that are not validated by the
schema: encoding schemes such as work types that vary from owner agency to
owner agency, and the business rules that define the required wages and
fringe benefits that a contractor employee should receive. These aspects
must be validated by the owner agency. Contractors must use the encoding
schemes each owner agency requires.
For example, the schema may require a code to be filled in, and simply
require that code to be any string. But a particular agency may have
certain values that the code can use, such as specific codes for ethnicity
or kinds of work performed. Users will have to be sure to only use
codes specified by the agency, even though other codes will validate
against the schema.
We will give an in-depth example of creating valid Payroll XML files
from given sample data. The example will take a fairly simple
case represented by a traditional US Department of Labor WH-347 form
and build a valid Payroll XML file from it. This example will spend
a lot of time explaining the meaning of the rules in the schema.