SmartResume Transformation and Presentation
SmartResume separates data from presentation. XSLT is used to transform XML data into other forms. Keeping the resume data and presentation separated, allows the use of XML for the raw resume data, while XSLT transforms the XML into other formats such as PDF, RTF and XHTML. This document describes how to write a smart resume in XML and utilize XSLT processors to transform it into other formats. All of the middleware and libraries listed in this document are bundled and available for download.
Installation and Setup
Prior to installing SmartResume, you must first install Java 2 Standard Platform and Apache Ant. Next, download SmartResume distribution file and unpack it in your desired directory. The following directory structure shows an overview of SmartResume directories and the files they contain.
$SMART_RESUME_HOME
|
+-- build.xml
+-- build.properties
+-- src/
+-- xml/
- resume.xml
+-- tools/
Tools
This section lists software application tools, libraries and middleware that are used by SmartResume. These libraries are included in the $SMART_RESUME_HOME/tools directory.
- XML Resume Library
-
The XML Resume Library is an XML and XSL based system for marking up, adding metadata to, and formatting resumes and curricula vitae.
- Xalan
-
Xalan-Java is an XSLT processor for transforming XML documents into XML, text, or other XML document types.
- FOP
-
FOP is the world's first print formatter driven by XSL formatting objects (XSL-FO) and the world's first output independent formatter.
- XMLmind FO Converter
-
XMLmind FO Converter is an XSL-FO to RTF converter.
- Xerces2
-
Xerces2 is the next generation of high performance, fully compliant XML parsers in the Apache Xerces family.
Content Preparation
First thing first. To prepare your resume, you need to edit (using the XML Resume Library elements) src/xml/resume.xml so that it corresponds to your profile. While at it, it's worth following the guidelines provided at CV Services website to polish the content of your resume.
Format Transformation
Once your resume data is in XML format, it can be transformed to various formats. Table below lists the main Ant targets available in the build.xml, these targets are prepared to ease the transformation process. There are also some examples showing the command line usage.
Table 1. Main Targets
| Target Name | Description | Related Property | Technology |
|---|---|---|---|
| xml2html | Translates the XML source to HTML output | xml2htm.(enabled|disabled) | Xerces2 |
| xml2fo | Translates the XML source to FO output | N/A | FOP |
| xml2pdf | Translates the XSL-FO source to PDF output | xml2pdf.(enabled|disabled) | FOP |
| xml2rtf | Translates the XSL-FO to RTF output | xml2rtf.(enabled|disabled) | XMLmind |
Table below list some of the configuration parameters available in the build.properties file.
Table 2. Main Configuration Properties
| Property Name | Description | Default Value | Possible Value |
|---|---|---|---|
default.uid |
Default User ID | ${user.name} |
OS defined |
default.lang |
Default language of the resume | en | ISO code |
default.roles |
Default roles used to filter appropriate XML elements | JavaArchitect | String |
default.mode |
Default resume mode; brief or verbose | brief |
N/A |