appendixInternalLinkSyntax
The Syntax for Creating Links
Editors can create links within their own text and their introductory essays; the links can be to other sections of their edition, to other sections of the ISE site, or to external sites. They can also embed graphics, videos, and even texts from other parts of the ISE website. Links can be created directly in any document as well as in its annotations or collation notes.
The canonical documentation of the "ilink" and "iembed" protocols is available in the documentation area of XWiki.
External Links
NOTE: links external to the ISE site should be made only when the editor is confident that the URL will not change in the future.
External links are made using the standard HTML <a> element. This element requires a href attribute that specifies the page to link to, and should contain text describing the end-point of the link. For example, to link to a Google search page for Shakespeare, you would write something like
The <a href="http://www.google.ca/search?q=Shakespeare">Google search for "Shakespeare"</a> currently shows the ISE as the second-highest authority on the internet!
Resources external to the ISE website should never be directly embedded into a document, with one exception: links to London locations in โThe Map of Early Modern London (MoEML) are treated in ISE, DRE, and QME texts as internal links. See below
Internal Links
Internal links are made using the <ilink> element. An "ilink" consists of two parts:
- The component of the whole website that contains the item to be linked. This may be the texts of the plays, the library of facsimiles, the Life and Times section of the site, or the database of Shakespeare in performance.
- The href, or specific location within the module that is the target for the link.
In most cases, you will be linking to another section of the same module -- from your introductory essays to a passage in the text, for example. In this case you will need to include only the second part of the ilink, the href.
The href attribute is used to specify what to link to, according to the rules described below. Some kinds of links also require a component attribute to be appropriately set. The element may contain text and markup describing the end-point of the link; if it is empty, a default description will be supplied.
Creating links from the annotations or collations of a document should look exactly the same as links from the document itself.
TLNs in the current document
If your document uses TLNs, you can create a link to a specific TLN like so:
Please refer to <ilink href="#tln-36">the full discussion</ilink> for details.
If your document does not use TLNs, you can link to a paragraph, since these will be numbered when your document is converted to Web format. You should insert a generic marker in the text (rather like "page 000" in a print MS). All paragraphs behave like TLNs, so your marker would look something like this:
Please see <ilink href="#tln-000">the quotation at the beginning of this essay</ilink>.
Later, when you are asked to proofread the document online, you can let the Coordinating Editor know what the paragraph number (and hence the TLN) should be.
Note that there is no short-hand for linking to pages or ranges of sections in the current document. For these kind of links to other documents, see below
Title Page of any text
To link to the title page of a document group, you just need to specify its code.
The <ilink href="AYL">title page of As You Like It</ilink> lists all introductory essays in this edition.
A Particular Document of any text group
Most links of this kind will look like this:
You may find that the <ilink href="AYL/F1">folio spelling</a> is a little confusing for high-school students.
This links to the first page in the scene view, since this is the default view. However, if you want to use something other than the scene view, use this syntax:
Pages of <ilink href="AYL/F1/page">the Folio as originally typeset</ilink> are also available.
Links to introductory and supplementary materials are handled in the same way. Each introductory essay will have a filename that includes the MLA abbreviation for the play, the name of the essay, and the extension ".xml". To link to one of these essays, use the filename excluding the initial MLA abbreviation and the file extension. Your General Introduction will have a filename like "AYL_GenIntro.xml"; thus you would replace "F1" in the previous example with "GenIntro". A cross reference from a level two note to your introduction to a specific section (paragraph) might read thus:
Please see the <ilink href="AYL/GenIntro#tln-12"> full discussion in the Introduction.
This would link to your paragraph 12 in the General Introduction. The same syntax links passages from one introductory essay to another or from an essay to supplementary materials:
This question is <ilink href="AYL/TextIntro#tln-8">discussed further</ilink> in my Textual Introduction. See <i>Galathea'</i> <ilink href="Gal/M#tln-19">TLN 19</ilink>.
In the second example above, the link is to the modern text ("M") of Galathea, paragraph 8. Use the same syntax to link to a TLN in a different play or its introductory essays:
John Cox discusses the process of printing in the First Folio in his <ilink href="JC/TextIntro#tln-2">Textual Introduction to Julius Caesar</ilink>.
Sections or TLNs of any text
To link to a particular section (or range of sections) or a text, the href would look like this (note that this links to your transcription, not the facsimiles):
See <ilink href="AYL/F1/page/2-4">pages 2 - 4</ilink> of the Folio text.
In this case you must specify the view type in the above format (although "default" is allowed).
You can also link to a particular TLN or any spot given an id (as explained above) like this:
Look <ilink href="AYL/F1/page#tln-265">half-way down the page</ilink> for an example.
In this case, if you don't care what view is used, you can leave it out, like so:
See <ilink href="AYL/F1#tln-265">TLN 265</ilink> for an example.
Level 3 Footnotes
"Level 3" footnotes are just regular standalone documents, and can be linked to in the same way as linking to another playtext.
Linking to the Life and Times
Use regular HTML or wiki links to point to Life and Times pages.
Linking to texts from ISE to QME or DRE (and vice versa)
All links between ISE, QME, and DRE plays are internal links. The only difference is that if the text is on a different site, you need to specify that in your link. Here's an example that will link to the home page for Leir from an ISE document:
<ilink site="QME" component="text" href="Leir">[linking text]</ilink>
Embedding
Embedding is achieved using the <iembed> element. This element has several attributes, some of which are optional:
- href: what resource to embed, similar to the href attribute of the <ilink> element. See below for examples.
- component: (optional) which part of the ISE site the resource is coming from. If you're embedding another text, leave this out or specify "text". If you're embedding something from the performance database, this should be "sip". In most other cases, this should be "static".
- showCaption : (optional) whether or not to display a caption. Possible values are "true", "false", and "auto". Defaults to "auto" which shows the caption if the iembed element has content, and otherwise suprresses it. If the value of this is "true", but the iembed element has no content, a default caption will be provided.
- height: (optional) maximum height, in pixels, of the embedded object. Defaults to the object's intrinsic height.
- width: (optional) maximum width, in pixels, of the embedded object. Defaults to the object's intrinsic width.
- align: (optional) position of the embedded object within the document. Possible values are "left", "center", "right", "lightbox", and "auto". "left" and "right" cause the object to float to the left or right of the document content respectively. "center" centers the object, suppressing text flow to the left and right of it. "lightbox" provides a link which will show the object in a popup when clicked. If this attribute is omitted, it defaults to "auto", which will attempt to keep the object inline with the text.
Looks complicated right? Well, it's not actually that bad once you see some examples…
Embedding Artifacts from the Performance Database
Embedding artifacts from the performance database will look like this:
<iembed component="sip" href="artifact:1234#standard">An example of a prompt book</iembed>
In the example above "1234" is the ID of the artifact to embed. "#standard" specifies that you want the standard size of the artifact. If you'd prefer the large, original, or thumbnail versions, you can use "#large", "#original", or "#thumbnail" respectively instead.
When embedding images, you will probably want to also specify the maximum height and width, to make sure the image fits properly into your text. For example,
<iembed component="sip" href="artifact:1234" height="300" align="right"/>
would make the image float to the right of the paragraph where the element appears, and would shrink it down until it's only 300 pixels high. Since I didn't specify which version of the artifact to use (with the "#standard" syntax as in the example above), the system will pick the size that is closest to 300 pixels high. Note that specifying both the height and width may distort the image if they aren't in the correct proportions; specifying only one or the other will ensure that the image keeps the proper aspect ratio.
Embedding Other Media
Pretty much anything else you may want to embed will end up being stored in the "static" area of the ISE site, so the embedding code will look like this:
<iembed component="static" href="textimages/mypic.jpg">An example</iembed>
where "textimages/mypic.jpg" specifies that you want the file "mypic.jpg" that's stored in the "textimages" directory. You will need to consult with the ISE technical team to find out what to actually use.
Previous | Table of Contents | Next