Couple of months ago, I have been asked by an Enterprise Architect in our company to prepare a requirement document for the transformation service prototype. The purpose of the transformation service prototype is to build the groundwork for creating a production transformation service between the Enterprise Contact Management System (ECM) to the Customer Information File (CIF). Briefly, I like to share few recommendations I made to the Enterprise Architect for building a transformation service using XML Stylesheet Transformation (XSLT).

• XML processing is very CPU, memory and I/O or network intensive. Also high level technology like XSLT rely on lower level technologies like SAX, DOM, JDOM and dom4j, which would have different performance impact for a given task. Using API like JDOM a developer may avoid some performance pitfalls when accessing elements by their tag names, since the API through the support of the Java Collection API is more straightforward. Also JDOM is lightweight and optimized for Java it may provide a sensitive gain in performance.
• JAXP with its support by many parsers and style sheet engines is a strong asset for application development. It’s worth capitalizing on so that later on, the underlying parser implementations can be swapped easily without requiring any application code changes.
• The cost of validation can be efficiently reduced taking into account the following:
1. Documents exchanged within the components of the system may not require validation
2. Documents coming from outside the system must be validated when entering
3. Documents coming from outside the system, once validated, may be exchanged freely between components without any other validation

In other words, since we own both the producer and consumer of XML documents, we may use validation only for debugging and turn it off when in production.