XPAGE Format

From EPrints Documentation
Revision as of 15:15, 11 January 2007 by Moj (talk | contribs)
Jump to: navigation, search

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)

Stored in the static folder, xpage files are portions of HTML that are rendered into static files when generate_static is run. Three tags are in the xpage namespace: xpage:page, xpage:title, and xpage:body.

The beginning of index.xpage (which generates the site's index page) is as follows - the three tags are analogous to the html, title, and body tags of an HTML document, except the body is included within the site's template. It is recommended to use xhtml as the default namespace to ease writing. As with templates, EPrints Control Format tags may be used.

<?xml version="1.0" encoding="iso-8859-1" standalone="no"  ?>
<!DOCTYPE page SYSTEM "entities.dtd" >
<xpage:page xmlns="http://www.w3.org/1999/xhtml" xmlns:xpage="http://eprints.org/ep3/xpage" xmlns:epc="http://eprints.org/ep3/control">
  <xpage:title>Welcome to <epc:phrase ref="archive_name" /></xpage:title>
  <xpage:body>Some example body text.</xpage:body>
</xpage:page>

When generate_statics is run, four static files are created for each xpage file. For index.xpage, these would be index.html (the HTML page), index.page (the contents of the xpage:body tag), index.title (the contents of the xpage:title tag), and index.title.textonly (the contents of the xpage:title with HTML tags stripped out). Note that these files are generated by generate_static, and shouldn't be edited by hand.