EPrints 2.2 Documentation - VLit Transclusion Support

What is VLit?

** This feature is still experimental **

VLit is a method for quoting a part of a document directly. It is available on any file in the public documents area of a text mime-type (text/plain, text/html etc). It allows a range of characters to be extracted rather than the entire document. This allows external systems, rather than quote by cut-and-paste, to quote in context of the original.

If you use it, please edit the vlit page in /opt/eprints2/archives/foo/cfg/static/en/vlit.xpage to indicate under what terms the feature may be used. When using ``human'' mode, described below, this page is what the (c) copyright symbol links to, by default.

Don't forget to re-run generate_static.

But I don't want this Feature...

If for some reason you want to disable VLit, you may do so in ArchiveConfig.pm - you will then need to re-run generate_apacheconf and restart the web server.

Edit the vlit page (as described above) to indicate that the feature is not available on your archive.

Invoking VLit

Simple Parameters

A simple transclusion is achieved by adding the following to the end of the URL of a text/* document:


Replacing ``offset'' and ``length'' with an integer. An offset of 0 and a length of 1 will return the first character. eg.


(All one URL, only split to fit on the page) This will return characters from offset 1403 to 1533.

Human Mode

An optional ``mode'' parameter may by used. The ``human'' mode returns the character range as HTML with characters like & properly escaped and new line characters turned into HTML ``br'' break tags. It will place two links before the text: a (c) link which will link to an explanation of transcopyright - If you want to change this URL you'll have to hack VLit.pm - and a TRANS link which will take you to the context of the quote - 1024 extra characters before and after but with the quote highlighted in red. Clicking TRANS on the context view will take you to the full raw document.

XML-Entity Mode

You may also set mode to be xml-entity, eg:


This returns the transclusion as a piece of XML which can be included as an external entity by other XML documents.


 <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
 <transclusion xlmns="http://xanadu.net/transclusion/xu/1.0"; 
 offset="10429" length="488">A more recent interactive screen 
 implementation of transpointing windows (screen shot fig. 5) was created 
 by Ka-Ping Yee in 1999.  This was served, like Walker's, from our xu88 
 server (rechristened as Udanax Green).  Yee's PYXI is a skeleton front 
 end that shows and edits text, links and transclusions, and may be 
 extended to reach more of the server's functionality.  Both Udanax Green 
 and PYXI were released under an open source license in 1999 (120), and are 
 available at udanax.com. </transclusion>

Area locspec

There is an 'area' locspec which requires the 'convert' unix command. It returns an area of an image specified as locspec=area:page=n/hrange=startx,endx/vrange=starty,endy where startx,endx,starty,endy and n are all positive integers. Any parts may be omitted: To specify the first 50 rows of page 3 locspec=area:page=3/vrange=,50.

 EPrints 2.2 Documentation - VLit Transclusion Support