Difference between revisions of "XPAGE Format"

From EPrints Documentation
Jump to: navigation, search
 
Line 1: Line 1:
 
Stored in the [[EPrints_Directory_Structure/eprints3/archives/ARCHIVEID/cfg/lang/en/static|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.
 
Stored in the [[EPrints_Directory_Structure/eprints3/archives/ARCHIVEID/cfg/lang/en/static|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. As with templates, [[EPrints Control Format]] tags may be used.  
+
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"  ?>
+
  <?xml version="1.0" encoding="iso-8859-1" standalone="no"  ?>
 
  <!DOCTYPE page SYSTEM "entities.dtd" >
 
  <!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: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:title>Welcome to <epc:phrase ref="archive_name" /></xpage:title>
  <xpage:body>
+
  <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.
 
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.

Revision as of 12:10, 8 January 2007

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.