<webpage id="smartResume">
  <config param="rcsdate" value="$Date: 2009-03-23 00:35:32 -0400 (Mon, 23 Mar 2009) $"/>
  <head>
    <title>
      SmartResume Transformation and Presentation
    </title>
    <summary>Howto prepare your resume in XML</summary>
    <keywords>Xalan, XSLT, XSL, DTD, XML, Resume, Java</keywords>
  </head>
  <para> 
    <acronym>SmartResume</acronym> separates data from presentation.
    <acronym>XSLT</acronym> is used to transform <acronym>XML</acronym>
    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 <acronym>PDF</acronym>, 
    <acronym>RTF</acronym> and <acronym>XHTML</acronym>. 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.
  </para>

  <section id="overview">
    <title>Overview</title>
    <orderedlist>
      <listitem>
	<para>
	  <emphasis>Installation and setup</emphasis>: 
	  <olink targetdoc="smartresumeProject">download</olink> and install the 
	  SmartResume distribution.
	</para>
      </listitem>
      <listitem>
	<para>
	  <emphasis>Content preparation</emphasis>: 
	  <olink targetdoc="smartResume" targetptr="preparation">prepare</olink> your resume data in XML.
	</para>
      </listitem>
      <listitem>
	<para>
	  <emphasis>Format transformation</emphasis>: 
	  <olink targetdoc="smartResume" targetptr="transformation">transform</olink> your resume to 
	  other formats such as PDF, XHTML and RTF.
	</para>
      </listitem>
    </orderedlist>
  </section>

  <section id="installation">
    <title>Installation and Setup</title>
    <para>
      Prior to installing SmartResume, you must first install
      <ulink url="http://java.sun.com/j2se">
	Java 2 Standard Platform
      </ulink> and <ulink url="http://ant.apache.org">Apache Ant</ulink>. Next,
      download 
      <olink targetdoc="projects">
	<application>SmartResume</application> distribution file
      </olink>
      and unpack it in your desired directory. 
      The following directory structure shows an overview of  
      SmartResume directories and the files
      they contain.
    </para>

    <programlisting>
<![CDATA[
$SMART_RESUME_HOME
    |
    +-- build.xml
    +-- build.properties
    +-- src/
      +-- xml/
        - resume.xml
    +-- tools/
]]>
    </programlisting>

    <section id="libList">
      <title>Tools</title>
      <para> 
	This section lists software application tools, libraries and middleware that
	are used by SmartResume. These libraries are 
	included in the <filename>$SMART_RESUME_HOME/tools</filename> directory.
      </para>
	<variablelist>
	  <varlistentry>
	    <term>
	      <ulink url="http://xmlresume.sourceforge.net"> 
	      XML Resume Library</ulink>
	    </term>
	    <listitem>
	      <para> 
		The XML Resume Library is an XML
		and <acronym>XSL</acronym> based system for marking up, adding 
		metadata to, and formatting resumes and curricula vitae. 
	      </para>
	    </listitem>
	  </varlistentry>
	  <varlistentry>
	    <term>
	      <ulink url="http://xml.apache.org/xalan-j/index.html">Xalan</ulink>
	    </term>
	    <listitem>
	      <para> 
		Xalan-Java is an XSLT processor for transforming
		XML documents into XML, text, or other
		XML document types. 
	      </para>
	    </listitem>
	  </varlistentry>
	  <varlistentry>
	    <term>
	      <ulink url="http://xml.apache.org/fop"><acronym>FOP</acronym></ulink>
	    </term>
	    <listitem>
	      <para>
		FOP is the world's first print formatter driven by
		XSL formatting objects 
		(<acronym>XSL-FO</acronym>) and the world's first
	      output independent formatter. 
	      </para>
	    </listitem>
	  </varlistentry>
	  <varlistentry>
	    <term>
	      <ulink url="http://www.xmlmind.com/foconverter">XMLmind 
	      <acronym>FO</acronym> Converter</ulink>
	    </term>
	    <listitem>
	      <para>
		XMLmind FO Converter is an 
		XSL-FO to RTF converter.
	      </para>
	  </listitem>
	  </varlistentry>
	  <varlistentry>
	    <term>
	      <ulink url="http://xml.apache.org/xerces2-j/index.html">Xerces2</ulink>
	    </term>
	    <listitem>
	      <para> 
		Xerces2 is the next generation of high performance, fully compliant
	      XML parsers in the Apache Xerces family. 
	      </para>
	    </listitem>
	  </varlistentry>
	</variablelist>
      </section>

  </section>

  <section id="preparation">
    <title>Content Preparation</title>
    <para> 
      First thing first. To prepare your resume, you need to edit (using the
      XML Resume Library elements) 
      <filename>src/xml/resume.xml</filename> so
      that it corresponds to your profile. While at it, it's worth following 
      the guidelines provided at 
      <ulink url="http://www.cvservices.net/alpha/default.asp">
	CV Services
	</ulink> website to polish the content of your resume.
    </para>
<!--
    <note>
      <para> 
	For those of you who are still TeXing, it's worth mentioning that in 
	the past, I kept my resume in TeX format. I have still kept an out 
	dated copy of my resume in 
	<ulink url="../../../whoami/resume/format/tex/resume.tex">
	  TeX format
	  </ulink>.
      </para>
    </note>
-->
  </section>

  <section id="transformation">
    <title>Format Transformation</title>
    <para> 
      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 <filename>build.xml</filename>, these targets are 
      prepared to ease the transformation process. There are also 
      some <olink targetdoc="smartResume" targetptr="examples">examples</olink> showing the command 
     line usage.
    </para>
    <table frame="none" pgwide="1" role="plain">
      <title>Main Targets</title>
      <tgroup align="left" cols="4">
	<thead>
	  <row>
	    <entry>Target Name</entry>
	    <entry>Description</entry>
	    <entry>Related Property</entry>
	    <entry>Technology</entry>
	  </row>
	</thead>
	<tbody>
	  <row>
	    <entry>
	      <command>xml2html</command>
	    </entry>
	    <entry>Translates the XML source to 
	    HTML output</entry>
	    <entry>
	    <command>xml2htm</command>.(enabled|disabled) </entry>
	    <entry>
	      <ulink url="http://xml.apache.org/xerces2-j/index.html">Xerces2
	      </ulink>
	    </entry>
	  </row>
	  <row>
	    <entry>
	      <command>xml2fo</command>
	    </entry>
	    <entry>Translates the XML source to FO 
	    output</entry>
	    <entry> N/A </entry>
	    <entry>
	      <ulink url="http://xml.apache.org/xalan-j/index.html">
	      FOP </ulink>
	    </entry>
	  </row>
	  <row>
	    <entry>
	      <command>xml2pdf</command>
	    </entry>
	    <entry>Translates the XSL-FO source to PDF output</entry>
	    <entry>
	    <command>xml2pdf</command>.(enabled|disabled) </entry>
	    <entry>
	      <ulink url="http://xml.apache.org/fop"> FOP </ulink>
	    </entry>
	  </row>
	  <row>
	    <entry>
	      <command>xml2rtf</command>
	    </entry>
	    <entry>Translates the XSL-FO to RTF output</entry>
	    <entry>
	    <command>xml2rtf</command>.(enabled|disabled) </entry>
	    <entry>
	      <ulink url="http://www.xmlmind.com/foconverter">XMLmind</ulink>
	    </entry>
	  </row>
	</tbody>
      </tgroup>
    </table>
    <para> Table below list some of the configuration parameters available in the
    <filename>build.properties</filename> file.</para>
    <table frame="none" pgwide="1" role="plain">
      <title id="resumeModuleTarge">Main Configuration Properties</title>
      <tgroup align="left" cols="4">
	<thead>
	  <row>
	    <entry>Property Name</entry>
	    <entry>Description</entry>
	    <entry>Default Value</entry>
	    <entry>Possible Value</entry>
	  </row>
	</thead>
	<tbody>
	  <row>
	    <entry>
	      <userinput>default.uid</userinput>
	    </entry>
	    <entry>Default User ID</entry>
	    <entry>
	      <userinput>${user.name}</userinput>
	    </entry>
	    <entry>
	      <userinput>OS defined</userinput>
	    </entry>
	  </row>
	  <row>
	    <entry>
	      <userinput>default.lang</userinput>
	    </entry>
	    <entry>Default language of the resume</entry>
	    <entry> en </entry>
	    <entry>
	      <userinput>ISO code</userinput>
	    </entry>
	  </row>
	  <row>
	    <entry>
	      <userinput>default.roles</userinput>
	    </entry>
	    <entry>Default roles used to filter appropriate XML elements</entry>
	    <entry> JavaArchitect </entry>
	    <entry>
	      <userinput>String</userinput>
	    </entry>
	  </row>
	  <row>
	    <entry>
	      <userinput>default.mode</userinput>
	    </entry>
	    <entry>Default resume mode; brief or verbose</entry>
	    <entry>
	      <userinput>brief</userinput>
	    </entry>
	    <entry>
	      <userinput>N/A</userinput>
	    </entry>
	  </row>
	</tbody>
      </tgroup>
    </table>
  </section>

  <section id="examples">
    <title>Usage Examples</title>
    <para>
      Assuming that SmartResume distribution file is 
      unpacked in <filename>$SMART_RESUME_HOME</filename>, the following
      examples show some transformations.
    </para>
    <example>
      <title>Complete run to produce the HTML output</title>
      <para> $ <userinput>cd <filename>$SMART_RESUME_HOME</filename></userinput>
      </para>
      <para> $ <userinput>emacs src/xml/resume.xml</userinput>
      </para>
      <para> $ <userinput>ant xml2html</userinput>
      </para>
      <para> $ <userinput>ant pack</userinput>
      </para>
    </example>
    <example>
      <title>Translating XML source to PDF output</title>
      <para> $ <userinput>ant xml2pdf</userinput>
      </para>
    </example>
    <example>
      <title>Translating XML source to RTF output and changing default role</title>
      <para> $ <userinput>ant -Ddefault.roles="JavaDeveloper" xml2rtf</userinput>
      </para>
    </example>
  </section>

</webpage>


