Difference between revisions of "Phrase Format"

From EPrints Documentation
Jump to: navigation, search
Line 5: Line 5:
 
             xmlns:epc="http://eprints.org/ep3/control">
 
             xmlns:epc="http://eprints.org/ep3/control">
 
   
 
   
   <epp:phrase id="myphrase">A phrase containing a <epc:pin name="mypin" /></epp:phrase>
+
   <epp:phrase id="myphrase">A phrase containing a <epc:pin name="mypin" />.</epp:phrase>
 
   
 
   
 
  </epp:phrases>
 
  </epp:phrases>

Revision as of 16:26, 9 January 2007

Phrase files are stored in the repository's phrases directory, and follow a straightforward format. All of the phrase elements described by the file are contained within a single root phrases tag:

<epp:phrases xmlns="http://www.w3.org/1999/xhtml" 
           xmlns:epp="http://eprints.org/ep3/phrase" 
           xmlns:epc="http://eprints.org/ep3/control">

  <epp:phrase id="myphrase">A phrase containing a <epc:pin name="mypin" />.</epp:phrase>

</epp:phrases>

The phrase element itself has an id attribute, which is used by the system to reference the phrase. One id matches one phrase - if a phrase is specified with an id that is already in use, the old phrase will be replaced. As such, the repository phrase files may override phrases from the system phrases.

EPrints Control elements may be used inside the phrase file - in this example a pin is used within the phrase, which is supplied when the phrase is rendered.