<?xml version="1.0" ?>

<!-- 
	Full citation for an eprint. 
-->

<cite:citation xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://eprints.org/ep3/control" xmlns:cite="http://eprints.org/ep3/citation" >

<choose>

  <when test="type = 'book' and is_set( creators )">
    <print expr="creators_name"/>
  </when>

  <when test="type = 'book' and !is_set( creators )">
    <print expr="editors_name"/>, ed<if test="length(editors_name) gt 1">s</if>.
  </when>

  <when test="type = 'patent'">
    <print expr="patent_applicant"/>
  </when>

  <otherwise>
    <print expr="creators_name"/>
  </otherwise>

</choose>

<if test="date">(<print expr="date" opts="res=year"/>)</if>

<cite:linkhere><xhtml:em><print expr="title" opts="magicstop"/></xhtml:em></cite:linkhere>

<choose>

  <when test="type.one_of( 'book','book_section' )">
    <if test="type = 'book_section'">
      In: <if test="!is_set(creators)"><print expr="editors_name"/>, (ed<if test="length(editors_name) gt 1">s</if>.)</if> 
      <print expr="book_title" opts="magicstop"/>
    </if>
    <if test="series">
      <print expr="series"/><if test="volume">, <print expr="volume"/></if>
      <if test="number"> (<print expr="number"/>)</if>.
    </if>
    <print expr="publisher"/><if test="place_of_pub">, <print expr="place_of_pub"/></if><if test="pagerange">, <print expr="pagerange"/></if>.
    <if test="isbn"> ISBN <print expr="isbn"/></if>
  </when>

  <when test="type = 'article'">
    <if test="publication"><print expr="publication"/><if test="volume">, <print expr="volume"/></if>
      <if test="number"> (<print expr="number"/>)</if>.
    </if>
    <if test="pagerange"> <print expr="pagerange"/>.</if>
    <if test="issn"> ISSN <print expr="issn"/></if>
  </when>

  <when test="type = 'monograph'">
    <print expr="monograph_type"/>.
    <print expr="publisher"/><if test="place_of_pub">, <print expr="place_of_pub"/></if>.
  </when>

  <when test="type = 'conference_item'">
    In: <print expr="event_title"/><if test="event_dates">, <print expr="event_dates"/></if><if test="event_location">, <print expr="event_location"/></if>.
  </when>

  <when test="type = 'thesis'">
    <print expr="thesis_type"/> thesis, <print expr="institution"/>.
  </when>

  <when test="type = 'patent'">
    <print expr="id_number"/>.
  </when>

  <when test="type = 'other'">
    <print expr="publisher"/><if test="place_of_pub">, <print expr="place_of_pub"/></if>.
  </when>

  <otherwise>
    [<print expr="type"/>]
  </otherwise>

</choose>

<if test=" ! type.one_of( 'patent','thesis' )">
  <if test="ispublished.one_of('unpub', 'submitted', 'inpress')"> (<print expr="ispublished"/>)</if>
</if>

</cite:citation>

