Metadata and Electronic Document Management for Electronic Commerce

Formatting the eBAS with XSL

Tom Worthington

Version of 2 August 2008

This item on "Formatting the eBAS with XSL" is part of the segment on "Metadata and Electronic Document Management for Electronic Commerce" first presented for the Australian National University course "Information Technology in Electronic Commerce" (COMP3410/COMP6341).

This document is intended to provide both for live group presentation and accompanying lecture notes for individual use. The Slides and these notes are provided in the one HTML document, using HTML Slidy.

Formatting the eBAS with XSL

Description: Specifications for electronic version of Activity Statement Form Types for
Business Activity Statement
Annual GST Return
Instalment Activity Statement
GST Calculation Worksheet for BAS.

From: Electronic Activity Statement Specifications, Version 2.4, Software Developers Homepage, ATO, May 2002, URL: http://ato.gov.au/softwaredevelopers

This is a demonstration of how XML transactions can be transformed into printable documents.

The Australian Taxation Office (ATO) provides specifications of electronic versions of tax forms on their Software Developers Homepage. This includes the Business Activity Statement (BAS) for to the Goods and Services Tax (GST).

ATO provide documentation for accounting software developers to incorporate the interface into their systems. While there are differences between the paper and electronic versions of the forms, it is possible to print out the electronic form in a similar format to the paper one, without the use of accounting software. As well as simplifying the systems needed for e-commerce (particularly small business) printable transactions can make the more acceptable for non-technical people.

The Australian Taxation Office (ATO), provide a Business Portal for submitting XML forms. The user enters their data in an accounting package, which generates an XML file in an ATO specified format. The file can be displayed in a web browser and then submitted to the portal.

Overview of the ATO Documentation

<FIELD ID="fG1">
<VALUE>2564125</VALUE>
<VISIBILITY>normal</VISIBILITY>
<IS_EDITABLE>true</IS_EDITABLE>
</FIELD>

Modified XML file format:

<GST_TOTAL_SALES>2564125</GST_TOTAL_SALES>

The ATO modified their approach to use of XML. Previously the XML format closely related to the fields on the paper form and how they were used. The newer format was a more abstract, and briefer, description of the data.

ATO ECI Client Interface

ATO to ECI then via XML to Accounts Package then SQL to DB

The ATO's free ECI Client software can be used to create an XML document which is then imported into an accounting package. Alternatively there is a simple command line interface to allow the accounting package to invoke the ECI software.

ATO Electronic Forms

Form

Target Audience

Field Labels

Quarterly BAS

(BAS-A)

Associated NAT numbers:

NAT 4189-4.2001

NAT 4189-9.2001

  • GST, PAYG withholding, PAYG instalment

Business Activity Statement Text Heading, Activity Statement Period Text Message, GST Period Text Message, PAYGW Period Text Message, PAYGI Period Text Message, T2 Notional Tax Text Message ...

Example eBAS Document

<FORM_PERIOD_LABEL_TEXT>July to September 2001</FORM_PERIOD_LABEL_TEXT>
<EFT_CODE> 51111 121 059 9059</EFT_CODE>
<BILLER_CODE>75556</BILLER_CODE>
<PAYG_WITHHOLDING>0</PAYG_WITHHOLDING>
<PAYG_INSTALMENT>12541</PAYG_INSTALMENT>
<DEFERRED_COMPANY_FUND_INSTALMENT>7879801</DEFERRED_COMPANY_FUND_INSTALMENT>
<TOTAL_DEBITS>7892342</TOTAL_DEBITS>
<TOTAL_CREDITS>0</TOTAL_CREDITS>
<NET_AMOUNT_FOR_THIS_STATEMENT>7892342</NET_AMOUNT_FOR_THIS_STATEMENT>
<GST_LABEL_TEXT>for the QUARTER from 1 Jul 2001 to 30 Sep 2001</GST_LABEL_TEXT>
<GST_ACCOUNTING_METHOD_LABEL_TEXT>Cash</GST_ACCOUNTING_METHOD_LABEL_TEXT>
<GST_ACCOUNTING_METHOD_LABEL>01</GST_ACCOUNTING_METHOD_LABEL>
<GST_OPTION_1>true</GST_OPTION_1>
...

Printing a BAS

eBAS via XML to Browser plus XSLT for format produces HTML to display form

While the ATO's ECI Client software can be used to print a BAS, this can also be done directly by software which can interpret an XML document.

Demonstration

XML

<CAC>001</CAC>

XSL

<p>Client Account Number <xsl:value-of select="CAC" /></p>

Result

Client Account Number 001

The XSL file atobas.xsl transforms the eBAS XML file atobas.xml to create a printable form.

As an example the Field "CAC" is printed with the caption "Client Account Number ".

XSL to XML to HTML

XSL to XML to HTML

BAS Form Transformed to HTML with XSLT

BAS Form

To make the result look more like the paper form, styles are used to right justify and colour the text.

XML Standards Actually work

<?xml version="1.0" ?>

<?xml-stylesheet type="text/xsl" href="atobas.xsl"?>

<!DOCTYPE NAT4189-4.2001.V2>

From: ATO e-BAS example, ATO, 2002 (modified), URL: http://www.tomw.net.au/2002/atobas.xml

The example was created and tested in 2002 with the Microsoft Internet Explorer Version 6 Web Browser. Like other newer versions of web browsers., IE6 has XSLT capabilities built in, so it is not necessary to have a separate software package to run the demonstration. The ATO's example eBAS XML file was modified by adding one line to the header, to instruct the browser to invoke the transformation automatically, to remove the need for manual intervention:

This same file was later loaded into Microsoft Word 2003 Beta 2. MS-Word automatically detected the XSLT entry and provided it as an option. By selecting this option "atobas.xsl" was retrieved from the web, the transformation applied to the data file and the resulting HTML document displayed. The result looks much as it does in MS-IE 6.

Update 2007: New XML formats for Tax

Tax XML is an initiative to research and analyze personal and business tax reporting & compliance information, represented in XML, to facilitate interoperability in a way that is open, flexible and international in scope. The products of Tax XML will include a vocabulary of terms, a repository of artifacts including XML templates, documents exchanged for tax compliance, best practices, guidelines and recommendations for practical implementation. It will focus on developing a common vocabulary that will allow participants to unambiguously identify the tax related information exchanged within a particular business context. ...

From: Statement of Purpose, OASIS Tax XML Technical Committee, OASIS, 2004?

Australian Taxation Office staff are members of the OASIS Tax XML Technical Committee, along with the Canada Revenue Agency, German Federal Ministry of the Interior, , Netherlands Tax and Customs Administration, UK H.M. Revenue & Customs, US IRS. This offers the prospect in the future of one standard global format for submitting value added tax (VAT)details electronically:

The ATO are also proposing a Standard Business Reporting model, allowing a single data update for multiple government agencies.



© Tomw Communciations Pty Ltd 2006 - 2008

Creative Commons License
Metadata and Electronic Document Management for Electronic Commerce by Tom Worthington is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.5 Australia License.

Web page by