Difference between revisions of "Citation Format"

From EPrints Documentation
Jump to: navigation, search
m (Reverted edit of RmwMon, changed back to last version by WikiSysop)
(Added reference to epc:comments)
 
(12 intermediate revisions by 4 users not shown)
Line 13: Line 13:
 
Two tags are provided under the citation namespace: cite:citation and cite:linkhere. The former is the root element of the file, and contains the body of the citation as well as any required namespaces. The latter surrounds one or many elements, and renders the content as a link to the item.
 
Two tags are provided under the citation namespace: cite:citation and cite:linkhere. The former is the root element of the file, and contains the body of the citation as well as any required namespaces. The latter surrounds one or many elements, and renders the content as a link to the item.
  
Other than <nowiki><cite:citation></nowiki> and <nowiki><cite:linkhere></nowiki>, you can also use the xhtml namespace, which is the default namespace (the one which doesn't need a foo: type prefix on tag names), and also the [[EPrints Control Format]] elements such as <epc:if> and <epc:print>.
+
Other than <nowiki><cite:citation></nowiki> and <nowiki><cite:linkhere></nowiki>, you can also use the xhtml namespace, which is the default namespace (the one which doesn't need a foo: type prefix on tag names), and also the [[EPrints Control Format]] elements such as <epc:if> and <epc:print> and <epc:comment>.  
 +
 
 +
Normal XML comments (using <nowiki><!-- --></nowiki>) within a citation are rendered in the output - comment out blocks of xml by wrapping with an <epc:comment> block instead of XML comments!

Latest revision as of 14:43, 15 October 2012

EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects


XML Configuration: EPScript - Control Format (EPC) - Citation - Workflow - Phrase - Template - XPAGE (static pages)


The citation format files, located in the repository's citations directory, describe how citations for documents, eprints, and users should be rendered. The name of the directories reflect the name of the dataset, with the filename within the directory (e.g. brief.xml) identifying the name of the citation style.

  <cite:citation xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:cite="http://eprints.org/ep3/citation" 
      xmlns:epc="http://eprints.org/ep3/control">
    <cite:linkhere><span class="ep_document_citation"><epc:print expr='format'/><epc:if test="formatdesc"> 
<epc:print expr="formatdesc"/>)</epc:if></span></cite:linkhere>
  </cite:citation>

Two tags are provided under the citation namespace: cite:citation and cite:linkhere. The former is the root element of the file, and contains the body of the citation as well as any required namespaces. The latter surrounds one or many elements, and renders the content as a link to the item.

Other than <cite:citation> and <cite:linkhere>, you can also use the xhtml namespace, which is the default namespace (the one which doesn't need a foo: type prefix on tag names), and also the EPrints Control Format elements such as <epc:if> and <epc:print> and <epc:comment>.

Normal XML comments (using <!-- -->) within a citation are rendered in the output - comment out blocks of xml by wrapping with an <epc:comment> block instead of XML comments!