Newer
Older
Digital_Repository / Repositories / otago_eprints3 / otago_eprints / cfg / citations / eprint / default.xml
<?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" /></xhtml:em><if test="type = 'software' and is_set( id_number )">, version <print expr="id_number"/></if>.</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">, <xhtml:strong><print expr="volume"/></xhtml:strong></if>
      <if test="number"> (<print expr="number"/>)</if><if test="pagerange">, <print expr="pagerange"/></if>.
    </if>
    <if test="issn"> ISSN <print expr="issn"/></if>
  </when>

  <when test="type = 'monograph'">
    <print expr="monograph_type"/><if test="id_number"> <print expr="id_number" /></if>.
    <if test="department">Department of <print expr="department" />, </if>
    <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><if test="pagerange">, <print expr="pagerange"/></if>.
  </when>

  <when test="type = 'thesis'">
    <print expr="thesis_type"/> thesis, <print expr="institution"/><if test="department"> (<print expr="department" />)</if><if test="place_of_pub">, <print expr="place_of_pub"/></if>.
  </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>

  <when test="type = 'standalone_pres'">
    <if test="place_of_pub"><print expr="place_of_pub"/></if>.
  </when>

  <when test="type = 'software'">
    <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>