Old Instructions On Markup Of Images Not Included In The Mms

THDL Toolbox > Web Development > THDL Essays in Cocoon > THDL Essays XML Mark-up Particulars > Old Markup for Images

Old Instructions on Markup of Images Not included in the MMS

(These are the old instructions for how to markup images in Cocoon essays, when the images are placed on the THDL site or in the Cocoon system. This was devised prior to the advent of the Media Management System and are recorded here only for archiving purposes. Unless given permission otherwise, ALL IMAGES SHOULD BE DELIVERED THROUGH THE MEDIA MANAGEMENT SYSTEM AND MARKUP ACCORDING TO THE INSTRUCTIONS FOR IMAGES ON THDL Essays XML Mark-up Particulars.)

The entity attribute contains the name of an entity declared in the DTD statement at the top of the article followed by the string SYSTEM and the URL for the image in quotes. These URLs are Cocoon-relative urls. That is, the images are all kept in the Cocoon essay application. On Quandu, this is at: textscocoonessaysimages. Within that folder, they are placed in a folder determined by the first letter of the author's last name. Each image file should be named by the following convention: {author's last name}-{descriptive title of image}.{extension} After the URL, the entity declaration has NDATA plus the extension of the image file-type in caps, such as "JPG", "PNG", or "GIF". (Note: These NDATA types for images must be declared at the top of the external-links.dtd file.)

For these Cocoon-based images, the server part of the URL should always be "ESSAYS-HOME". This string is replaced by the Ajax calls with the location of the Cocoon essay app relative to the page calling the essay page. This makes one system work universally on www.thdl.org, staging.thdl.org, or one's localhost. Any example image entity declaration is:

<!ENTITY img1 SYSTEM "http://ESSAYS-HOME/c/cabezon-monk2.jpg" NDATA JPG>

Thus, altogether at the top of the article, the DTD declaration is as follows:

<!DOCTYPE TEI.2 SYSTEM "http://www.thdl.org/xml/dtds/xtib3.dtd" [
	<!ENTITY % extlinks SYSTEM "../external-links.dtd" >
	%extlinks;
	
	<!ENTITY img1 SYSTEM "http://ESSAYS-HOME/c/cabezon-monk2.jpg" NDATA JPG>
	<!ENTITY img2 SYSTEM "http://ESSAYS-HOME/c/cabezon-pilgrims-penpo.jpg" NDATA JPG>

]>

If two images are to be rendered side-by-side, then they are places in a <p> element with type="imgs" and an n attribute set to the maximum number of pixels width of the two images combined and one of the images is floated left using the rend="left" attribute, as follows:

<p rend="imgs" n="650">
   <figure entity="img3">
      <figDesc>Local worshippers make butter offerings into the butter-lamps in a chapel
                   of one of Sera’s regional-houses (Sera, Tibet).</figDesc>
   </figure>
   <figure entity="img4" rend="left">
      <figDesc>A young Tibetan girl, art supplies in hand, about to enter one of Sera’s temples in Tibet.</figDesc>
   </figure>
</p>

The name of the entity (between ENTITY and SYSTEM) is what is used in the entity attribute of the <figure> element.

Images are to be stored in the following location:

  • {thdl trunk}/texts/cocoon/essays/images/{first letter of author's last name}/{image name}.{image extension}