1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference...

37
1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000

Transcript of 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference...

Page 1: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

1

Use of XML in LDR's Integrated Tax System

Louisiana Department of Revenue

Technology ConferenceSan Antonio, TX

August 13 - 16, 2000

Page 2: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

2

Background

Thin pc clients (Windows NT) with applications and data residing on a mainframe server

Object-oriented analysis and design using Rational Rose design tools

Java development using Visual Age for Java MQSeries for message handling MQSeries WorkFlow as the workflow manager DB2 (6.X, most current version at time of implementation) as the

database on an OS/390

LDR is currently engaged in a cooperative endeavor with IBM for a complete redesign and redevelopment of the software systems that support the administration of taxes. The system is being designed, developed and implemented using the following:

Page 3: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

3

Challenge

The department exchanges and processes data from multiple sources in a variety of formats.

For today and in the future, the goal is to develop a system with a standardized approach for processing data created and processed in multiple formats.

Page 4: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

4

Solution: XML

XML is the the most logical solution to the challenge of developing a system with a standardized approach for processing data that is created and processed in multiple formats.

Page 5: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

5

Reasons for choosing XML

- XML is simple, straightforward and human readable- XML is platform independent- XML is programming language independent- XML is extensible and easy to maintain- Standardized interfaces (APIs) for processing XML data- Many tools exist for parsing and transforming XML data- Standardized (W3C)

Page 6: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

6

Key Definitions

XML - extensible markup language is an open standard (W3C) that provides a data format and a data modeling language for defining data.

DTD - document type definition is the modeling mechanism for XML. It provides the rules for how XML data is defined and logically related.

Well-formed XML - an XML document in proper XML format, but with no structural conformance to a DTD (flat XML).

Valid XML - an XML document in proper XML format with a structural conformance to a DTD (structured XML).

XSLT - extensible stylesheet language for transforming XML documents into other XML documents.

Page 7: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

7

Uses of XML at LDR

Data exchange format for forms processed by the system External sources Internal sources

Data exchange format for data between sub-systems Data exchange format for legacy system data being converted into

the new system Data exchange format for data exchanged to other LDR systems

Page 8: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

8

External Sources of Forms

Data entry of original forms Scanned original forms Others, as defined and implemented

Electronic filings EDI EFT Internet Flat files of various types of data (tape and diskette)

Page 9: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

9

Original Documents from Data Entry or Scanners

All original forms (remitted by the taxpayer) are converted into an internally developed format called Universal Data Format.

The data is validated for syntactical and contextual correctness. Data passing validation is routed further into the system for

conversion into flat XML. Data failing validation will not be processed any further within the

system.

Page 10: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

10

Reasons for Using UDF

Validating data in UDF format is a relatively new process that works well.

This step provides assurance that data which the system played no part in creating, is valid to the extent that it can be processed within the system.

Cost and timing factors weighed into the decision to retain this method of validation.

Future plans are to develop validation routines against data in XML format to eliminate this step.

Page 11: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

11

Example of UDF Record

000001INIT0101BATHDR1234567890123451998-12-31-00.00.00.00000000560013001000010001300200003000130030000400016004072894263 1 | 2| 3| 4| 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13| 14 | 15 | 16| 17 | 18| 19| 20

Page 12: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

12

Example of UDF Record (cont.)

Where,1.) 000001 – is the record identifier attribute value of the header2.) INIT – is the record type attribute value of the batch header3.) 01 – is the segment number attribute value of the header4.) 01 – is the total number of the segments attribute value of the header5). BATHDR – is the document type attribute value of the header6.) 123456789012345 – is the batch identifier attribute value of the header, for illustration purposes only.7.) 1998-12-31-00.00.00.000000 – is the processing date attribute value of the header 8.) 0056 – is the length of the variable portion of the record. 9.) 0013 – is the parameter length (parameter included in the total)

of the “Number of Returns in the Batch” parameter10.) 0010 – is the code identifier of the “Number of Returns in the

Batch” parameter 11.) 00030 – is the value of the “Number of Returns in the Batch”

parameter...

Page 13: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

13

UDF file onOperations

server

UDF file on themainframe

Valid UDF file forflat XML

conversion

Notification fileon the

mainframe

Notification fileon Operations

server

Dividing line betweenserver and mainframe

Data transmitted to the mainframe via TCP/IP

GeneratesGenerates

Data transmitted via TCP/IP

Operationsserver

Mainframe

UDF ValidationProcess

UDF Validation Diagram

Page 14: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

14

Conversion of UDF to XML

UDF format records are converted to flat (well-formed) XML. The flat form of the record is simply a mapping out of the UDF data in XML format.

The flat XML records are transformed using XSLT into structured (valid) XML. XSLT expects, at least, a well-formed document for transforming.

Page 15: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

15

Reasons for Two Phased Conversion

Allows a very simple format of flat XML data to be created by external systems for conversion, as required, to structured XML.

Flat XML is a better format to receive data from external sources into the system for conversion because that single format of data is simple and can be transformed into many different structured versions of the record by transforming the data with multiple DTDs using XSLT.

Page 16: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

16

Validated UDFfile

Custom UDF toflat XML

conversionFlat XML

XSLTtransformer

Structured XMLfor input into

renderer

DTD

UDF to XML Conversion Diagram

Page 17: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

17

Example of Flat XML Document

<?xml version="1.0"?><form> <field id="1000">2003</field> <field id="1010">1234567891</field> <field id="1015">333333333</field> <field id="1017">233300</field> <field id="1040">19991231</field> <field id="1050">CITM</field> <field id="1055">20000522</field> <field id="1060">20000526</field> <field id="1105">MAIL</field> <field id="1125">N</field> <field id="1130">N</field> <field id="1135">N</field> <field id="1140">N</field>...</form>

Page 18: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

18

<?xml encoding='UTF-8' ?>

<!-- edited with XML Spy v3.0 NT (http://www.xmlspy.com) --><!--

STARTER FILE CONTAINING ALL TAX FORM XML

Includes:

Global Definitions LDR Form CFT4 LDR Form CIFT620 LDR Form IT620ES

Revision: DRAFT Date: May 30, 2000

TBD: refine definitions for entities with strict formats?

--><!-- ENTITIES --><!-- TBD: promote appropriate constructs to entities as needed --><!-- ELEMENTS --><!-- --><!-- Generics --><!-- -->

Example of DTD

Page 19: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

19

<!-- Identification Numbers --><!ELEMENT LRAN (#PCDATA )>

<!-- Louisiana Revenue Account Number --><!ELEMENT FEIN (#PCDATA )>

<!-- Federal Employer Identification Number --><!ELEMENT BusinessCodeNumber (#PCDATA )>

<!-- Dates --><!ELEMENT YearMonthDay (#PCDATA )>

<!ELEMENT YearMonth (#PCDATA )>

<!ELEMENT Year (#PCDATA )>

<!ELEMENT DateIssued (#PCDATA )>

<!-- Periods --><!ELEMENT Period (PeriodStart? , PeriodEnd )>

<!ELEMENT PeriodStart (#PCDATA )>

<!ELEMENT PeriodEnd (#PCDATA )>

<!-- Names --><!ELEMENT BusinessName (#PCDATA )>

<!ELEMENT PersonName (#PCDATA )>

Example of DTD (cont.)

Page 20: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

20

<!-- Addresses --><!ELEMENT MailingAddress (Street , StateOrProvince , Country? , ZipOrPostalCode )>

<!ELEMENT Street (#PCDATA )>

<!ELEMENT StateOrProvinceOfIncorporation (#PCDATA )>

<!ELEMENT StateOrProvince (#PCDATA )>

<!ELEMENT ZipOrPostalCode (#PCDATA )>

<!ELEMENT Country (#PCDATA )>

<!-- Telephone Numbers --><!ELEMENT Telephone (#PCDATA )>...

Example of DTD (cont.)

Page 21: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

21

Example of a Structured XML Document

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE TaxFormLDRCIFT620 (View Source for full doctype...)>

<TaxFormLDRCIFT620>

<FormHeader formName="CIFT620" />

<BasicBusinessInfo>

<LRAN>1234567891</LRAN>

<FEIN>333333333</FEIN>

<BusinessCodeNumber>233300</BusinessCodeNumber>

</BasicBusinessInfo>

<Period>

<PeriodEnd>19991231</PeriodEnd>

</Period>

.

.

.

</TaxFormLDRCIFT620>

Page 22: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

22

Document Renderer

Developed for the specific purpose of converting form data from other formats into XML and XML to other data formats for processing within the system.

Enables transforming between XML and Java objects for processing and efficient storage of data.

Data is rendered using a SAX (simple api for XML) compliant parser. SAX is a simple API for parsing XML documents and almost all parsers support it.

Page 23: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

23

Processing of Form Data using the Document Renderer

A file of structured XML forms that are ready to be validated are read by a form validation application.

The application will rely on the document renderer to convert the structured XML version of the form to the corresponding domain objects required for validation.

The validation rule engine will validate the form for correctness within the context of the taxpayer’s registration and accounting profile.

The validated data in the domain objects is persisted in the underlying database.

Page 24: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

24

Structured XMLfor input torenderer

XML documentrendered into

structures suitablefor validation and

persistence

Domainobjects

Validation enginevalidates data

Did form validatesuccessfully?

Posting queueentry generated

in structuredXML format

Posting queue(MQSeries)

Request for workitem generated in

structured XMLformat

Posting monitorapplication parses and

processes

Work item requestqueue

(MQSeries)

Case Managementmonitor application

parses andprocesses

No

Original FormValidation

Data in domainobjects is persisted

in underlyingdatabase

Yes

Page 25: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

25

Internal Sources of Forms

Internal forms originating from a GUI Internal forms generated from system processes

Page 26: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

26

Internal Forms Originating from a GUI

Users key data utilizing a GUI. The resulting raw data is passed on for transformation.

The raw data is converted to an XML version of a form and passed on for rendering.

The XML version of the form is rendered into the domain objects for validation.

Once validation is complete, the data is either persisted in the database or routed back to the presentation layer for correction.

Page 27: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

27

User

Raw data to XMLtransformer/

XML to Raw datatransformer

XML rendered intodomain objects/Domain objects

rendered into XML

Form validated byvalidation engine

Data in domainobjects is

persisted inunderlyingdatabase

Did form validatesuccessfully?

Yes

XML data

Domain objects

Rawdata

No

Online form entryprocess

Posting queueentry generated

in structuredXML format

Posting queue(MQSeries)

Posting monitorapplication parses and

processes

Page 28: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

28

Internal Forms Generated from System

Processes

Processes within the system may independently determine that there is a need for adjustments to the taxpayer’s account.

All accounting data emanates from a form. A request for the creation of a form to initiate the creation of the

adjusting accounting data must be made.

Page 29: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

29

Structured XMLfor input torenderer

Structured XMLdocument renderedinto domain objectsfor validation and

persistence

Domainobjects

Validation enginevalidates data

Posting queueentry generated

in structuredXML format

Posting queue(MQSeries)

Posting monitorapplication parses and

processes

SystemGenerated

Form Validation

Data in domainobjects is persisted

in underlyingdatabase

System process requires creation ofa form and formats XML accordingly(could be internal or external to the

Forms Processing sub-system)

Page 30: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

30

Legacy Data Conversion

Taxpayer registration data must be migrated from the legacy system into the new system to populate the database.

A COBOL program was written to extract legacy registration data and create a file of structured XML records.

The structured XML records are parsed into domain objects and the data contained in the domain objects is persisted in the underlying database.

Page 31: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

31

Structured XMLregistration

conversion data

Structured XMLregistration datavalidated againstDTD (ensures a

valid XML record)

Data in domain objects ispersisted in underlying

database

Legacy dataconversion

COBOL programextracts legacy data

and creates structuredXML

Valid?

Reject fileNo

Yes

Page 32: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

32

Data Exchanged to Other LDR Systems

A data warehouse application will require input data from the main system database.

The data needs to be reformatted to assume a meaningful context in the warehouse applications.

Page 33: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

33

System Form DataExchanged to Data

Warehouse

Data fromthe mainsystem

database

Main system domainobjects rendered intostructured XML using

DTD defined forwarehousing format

File of structured XMLdata for loading into

data warehouse

XML data parsed out intodomain objects of

warehouse database

Data in domain objects ispersisted in underlying

database

Page 34: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

34

Lessons Learned

Keep things simple Carefully plan, design and develop the DTD using clear and

descriptive comments in its definition Many XML manipulation tools are available and many more are on

the way! Keep abreast of advancement in technology

XML Schema XML Binding Others

Page 35: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

35

Sites of Interest

www.alphaworks.ibm.com www.apache.org xml.com xml.org www.ebxml.org www.oasis-open.org www.w3c.org Java.sun.com/xml

Page 36: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

36

Conclusion

What’s the big deal? There’s nothing magic going on here. XML simply serves as a means of exchanging and transforming

data. With a standardized format for data exchange and open source

initiatives for software to transform this data, the bulk of the design and development effort can be targeted toward the logic of business processing.

Page 37: 1 Use of XML in LDR's Integrated Tax System Louisiana Department of Revenue Technology Conference San Antonio, TX August 13 - 16, 2000.

37

Contact Information

Barry Aucoin Louisiana Department of RevenueLDR Information Services Divisionemail: [email protected]: (225) 925-4220fax: (225) 922-0850