<?xml version="1.0" encoding="utf-8"?>
<!-- Note that this stylesheet relies on the XMLDocument and XSLDocument properties and thus
     only works when browsing XML -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:variable name="ignore_detail" select="'long'" />	<!-- 'long' | 'short' -->

<xsl:output method="text" version="4.0" encoding="utf-8"/>
<xsl:strip-space elements="p"/>

<xsl:template match="/"><xsl:apply-templates select="*"/></xsl:template>

<xsl:template match="Resume">
<xsl:apply-templates select="ResumeBody"/>
<xsl:apply-templates select="ResumeProlog/RevisionDate"/>
</xsl:template>

<xsl:template match="ResumeProlog/RevisionDate">



Generated from file modified in <xsl:apply-templates select="Date"/>
</xsl:template>

<xsl:template match="ResumeBody">
      <xsl:apply-templates select="PersonalData"/>
      <xsl:apply-templates select="ResumeSection"/>
</xsl:template>

<xsl:template match="PersonalData">
<xsl:value-of select="Name"/>
<xsl:text xml:space="preserve">
</xsl:text>
<xsl:apply-templates select="Address"/>
<xsl:text xml:space="preserve">
</xsl:text>
<xsl:apply-templates select="Voice"/>
<xsl:text xml:space="preserve">
</xsl:text>
<xsl:apply-templates select="Email"/>
<xsl:text xml:space="preserve">
</xsl:text>
</xsl:template>

<xsl:template match="Name"><xsl:value-of select="First"/> <xsl:value-of select="Middle"/> <xsl:value-of select="Last"/></xsl:template>

<xsl:template match="Address"><xsl:value-of select="AddressLine"/>, <xsl:value-of select="City"/>, <xsl:value-of select="State"/><xsl:text> </xsl:text><xsl:value-of select="PostalCode"/></xsl:template>

<xsl:template match="Voice">phone: (<xsl:value-of select="AreaCode"/>) <xsl:value-of select="TelNumber"/></xsl:template>

<xsl:template match="Email">e-mail: <xsl:value-of select="." /></xsl:template>

<xsl:template match="ResumeSection">
<xsl:text xml:space="preserve">
</xsl:text>
<xsl:value-of select="SectionTitle"/>
<xsl:text xml:space="preserve">
</xsl:text>
<xsl:text xml:space="preserve">
</xsl:text>
<xsl:apply-templates select="SubTitle"/>
<xsl:apply-templates select="SecBody"/>
<xsl:text xml:space="preserve">
</xsl:text>
</xsl:template>

<xsl:template match="ResumeSection/SubTitle">
<xsl:value-of select="."/>
</xsl:template>

<xsl:template match="ResumeSection[@SecType = 'Experience']">
<xsl:apply-templates select="SectionTitle"/>
<xsl:apply-templates select="SecBody"/>
<xsl:text xml:space="preserve">
</xsl:text>
<xsl:text xml:space="preserve">
</xsl:text>
</xsl:template>

<xsl:template match="ResumeSection[@SecType = 'Experience']/SectionTitle">
<xsl:value-of select="JobTitle"/> -- <xsl:value-of select="EmployerName"/>, <xsl:value-of select="Address/City"/>, <xsl:value-of select="Address/State"/>
<xsl:text xml:space="preserve">
</xsl:text>
<xsl:apply-templates select="StartDate/Date"/> - <xsl:apply-templates select="EndDate/Date | EndDate/CurrentPosition"/>
<xsl:text xml:space="preserve">
</xsl:text>
<xsl:text xml:space="preserve">
</xsl:text>
</xsl:template>

<xsl:template match="SecBody">
	<xsl:apply-templates select="*"/>
</xsl:template>

<xsl:template match="Date"><xsl:value-of select="Month"/>/<xsl:value-of select="Year"/></xsl:template>
<xsl:template match="CurrentPosition">present</xsl:template>

<xsl:template match="p">
<xsl:text xml:space="preserve">   </xsl:text><xsl:apply-templates select="node()"/>
<xsl:text xml:space="preserve">
</xsl:text>
</xsl:template>

<xsl:template match="ResumeSection[@SecType = 'Experience']/SecBody/p">
<xsl:choose>
<xsl:when test="@details=$ignore_detail"></xsl:when>
<xsl:otherwise>
<xsl:text xml:space="preserve">   </xsl:text>
<xsl:value-of select="normalize-space(.)"/>
<xsl:text xml:space="preserve">
</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

</xsl:stylesheet>



