Bibtext Renderer
================

Add a lightweight content object implementing IBibliographicReference.

  >>> context = SimpleContent()

Call the EndNote render view

  >>> from zope.publisher.browser import TestRequest
  >>> from bibliograph.rendering.renderers.endnote import XmlRenderView

  >>> request = TestRequest()
  >>> view = XmlRenderView(context, request)

  >>> print view()
  <?xml version="1.0" encoding="UTF-8"?>
  <modsCollection xmlns="http://www.loc.gov/mods/v3">
  <mods ID="approach">
      <titleInfo>
          <title>A new approach to managing literat&#252;re</title>
      </titleInfo>
      <name type="personal">
          <namePart type="given">Heinz</namePart>
          <namePart type="family">M&#252;ller</namePart>
          <role>
              <roleTerm authority="marcrelator" type="text">editor</roleTerm>
          </role>
      </name>
      <originInfo>
          <issuance>monographic</issuance>
          <dateIssued>1985</dateIssued>
      </originInfo>
      <typeOfResource>text</typeOfResource>
      <genre authority="marcgt">book</genre>
      <abstract>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</abstract>
      <subject>
          <topic>Manage Literat&#252;r</topic>
      </subject>
      <identifier type="citekey">approach</identifier>
      <location>
          <url>http://www.books.com/approach</url>
      </location>
  </mods>
  </modsCollection>
  <BLANKLINE>

Let's change some attributes of our content.

First we want no editor, but an author:

  >>> context.editor_flag = False
  >>> view = XmlRenderView(context, request)
  >>> print view()
  <?xml version="1.0" encoding="UTF-8"?>
  <modsCollection xmlns="http://www.loc.gov/mods/v3">
  <mods ID="approach">
      <titleInfo>
          <title>A new approach to managing literat&#252;re</title>
      </titleInfo>
      <name type="personal">
          <namePart type="given">Heinz</namePart>
          <namePart type="family">M&#252;ller</namePart>
          <role>
              <roleTerm authority="marcrelator" type="text">author</roleTerm>
          </role>
      </name>
      <originInfo>
          <issuance>monographic</issuance>
          <dateIssued>1985</dateIssued>
      </originInfo>
      <typeOfResource>text</typeOfResource>
      <genre authority="marcgt">book</genre>
      <abstract>Lorem ipsum dolor sit amet, consectetuer adipiscing elit.</abstract>
      <subject>
          <topic>Manage Literat&#252;r</topic>
      </subject>
      <identifier type="citekey">approach</identifier>
      <location>
          <url>http://www.books.com/approach</url>
      </location>
  </mods>
  </modsCollection>
  <BLANKLINE>

We can also omit some fields:

  >>> request = TestRequest(form=dict(omit_fields=['authors', 'uRl', 'abSTRACT']))
  >>> view = XmlRenderView(context, request)
  >>> print view()
  <?xml version="1.0" encoding="UTF-8"?>
  <modsCollection xmlns="http://www.loc.gov/mods/v3">
  <mods ID="approach">
      <titleInfo>
          <title>A new approach to managing literat&#252;re</title>
      </titleInfo>
      <originInfo>
          <issuance>monographic</issuance>
          <dateIssued>1985</dateIssued>
      </originInfo>
      <typeOfResource>text</typeOfResource>
      <genre authority="marcgt">book</genre>
      <subject>
          <topic>Manage Literat&#252;r</topic>
      </subject>
      <identifier type="citekey">approach</identifier>
  </mods>
  </modsCollection>
  <BLANKLINE>

