Transclusion
Encyclopedia
In computer science
Computer science
Computer science or computing science is the study of the theoretical foundations of information and computation and of practical techniques for their implementation and application in computer systems...

, transclusion is the inclusion of a document or part of a document into another document by reference.

For example, an article about a country might include a chart or a paragraph describing that country's agricultural exports from a different article about agriculture. Rather than copying the included data and storing it in two places, a transclusion embodies modular design
Modular design
Modular design, or "modularity in design" is an approach that subdivides a system into smaller parts that can be independently created and then used in different systems to drive multiple functionalities...

, by allowing it to be stored only once (and perhaps corrected and updated if the link type supported that) and viewed in different contexts. The reference also serves to link both articles.

The term was coined by hypertext
Hypertext
Hypertext is text displayed on a computer or other electronic device with references to other text that the reader can immediately access, usually by a mouse click or keypress sequence. Apart from running text, hypertext may contain tables, images and other presentational devices. Hypertext is the...

 pioneer Ted Nelson
Ted Nelson
Theodor Holm Nelson is an American sociologist, philosopher, and pioneer of information technology. He coined the terms "hypertext" and "hypermedia" in 1963 and published it in 1965...

 in 1982.

Context neutrality

Transclusion works better when transcluded sections of text are self-contained, so that the meaning and validity of the text is independent of the context in which it appears. For example, formulations like "as explained in the previous section" are problematic, because the transcluded section may appear in a different context, causing confusion. What constitutes "context neutral" text varies, but often includes things like company information or boilerplate
Boilerplate (text)
Boilerplate is any text that is or can be reused in new contexts or applications without being changed much from the original. Many computer programmers often use the term boilerplate code. A legal boilerplate is a standard provision in a contract....

.

Parameterization

Under some circumstances, and in some technical contexts, transcluded sections of text may not require strict adherence to the "context neutrality" principle, because the transcluded sections are capable of parameterization. Parameterization implies the ability to modify certain portions or subsections of a transcluded text depending on exogenous variables that can be changed independently. This is customarily done by supplying a transcluded text with one or more substitution placeholders. These placeholders are then replaced with the corresponding variable values prior to rendering the final transcluded output in context.

History and implementation by Project Xanadu

Nelson (who had also originated the words "hypertext" and "hypermedia
Hypermedia
Hypermedia is a computer-based information retrieval system that enables a user to gain or provide access to texts, audio and video recordings, photographs and computer graphics related to a particular subject.Hypermedia is a term created by Ted Nelson....

") coined the term "transclusion" in his 1982 book, Literary Machines
Literary Machines
Literary Machines is a book first published in 1980 by Ted Nelson, and republished 9 times by 1993. It offers an extensive overview of Nelson's term "hypertext" as well as Nelson's Project Xanadu...

. Part of his proposal was the idea that micropayment
Micropayment
A micropayment is a financial transaction involving a very small sum of money and usually one that occurs online. PayPal defines a micropayment as a transaction of less than 12 USD while Visa prefers transactions under 20 Australian dollars, and though micropayments were originally envisioned to...

s could be automatically exacted from the reader for all the text, no matter how many snippets of content are taken from various places.

However, according to Nelson, the concept of transclusion had already formed part of his 1965 description of hypertext
Hypertext
Hypertext is text displayed on a computer or other electronic device with references to other text that the reader can immediately access, usually by a mouse click or keypress sequence. Apart from running text, hypertext may contain tables, images and other presentational devices. Hypertext is the...

; he also interprets the notion of "trails" in Vannevar Bush
Vannevar Bush
Vannevar Bush was an American engineer and science administrator known for his work on analog computing, his political role in the development of the atomic bomb as a primary organizer of the Manhattan Project, the founding of Raytheon, and the idea of the memex, an adjustable microfilm viewer...

's 1945 essay As We May Think
As We May Think
As We May Think is an essay by Vannevar Bush, first published in The Atlantic Monthly in July 1945, and republished again as an abridged version in September 1945 — before and after the U.S. nuclear attacks on Japan...

 as describing transclusion rather than hyperlink
Hyperlink
In computing, a hyperlink is a reference to data that the reader can directly follow, or that is followed automatically. A hyperlink points to a whole document or to a specific element within a document. Hypertext is text with hyperlinks...

s.

Nelson defines transclusion as "the same content knowably in more than one place", setting it apart from more special cases such as the inclusion of content stored in a different location (which he calls "transdelivery") or "explicit quotation
Quotation
A quotation or quote is the repetition of one expression as part of another one, particularly when the quoted expression is well-known or explicitly attributed by citation to its original source, and it is indicated by quotation marks.A quotation can also refer to the repeated use of units of any...

 which remains connected to its origins" (which he calls "transquotation").

Some hypertext systems, including Ted Nelson's own Xanadu Project
Project Xanadu
Project Xanadu was the first hypertext project, founded in 1960 by Ted Nelson. Administrators of Project Xanadu have declared it an improvement over the World Wide Web, with mission statement: "Today's popular software simulates paper...

, support transclusion.

Nelson has delivered a demonstration of Web transclusion, the Little Transquoter (programmed to Nelson's specification by Andrew Pam in 2004-2005). It creates a new format built on portion addresses from Web pages; when dereferenced, each portion on the resulting page remains click-connected to its original context—always a key aspect of transclusion for Nelson, but missing in most implementations of transclusion.

HTML

, transclusion in HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

 is somewhat limited by lack of standards support in web browsers. Although all graphical browsers can transclude an image
Inline linking
Inline linking is the use of a linked object, often an image, from one site by a web page belonging to a second site...

, including a document is a bit more difficult. There are currently two methods of achieving this result:
  • The IFrame (inline frame) element, which includes whole documents.
  • The Object element. In Firefox and other browsers, this allows true document transclusion, enabling one page to be built from several smaller documents.


In addition, Ajax
Ajax (programming)
Ajax is a group of interrelated web development methods used on the client-side to create asynchronous web applications...

 can achieve a similar result across all modern, JavaScript
JavaScript
JavaScript is a prototype-based scripting language that is dynamic, weakly typed and has first-class functions. It is a multi-paradigm language, supporting object-oriented, imperative, and functional programming styles....

-enabled browsers.

Future versions of HTML may support deeper transclusion of portions of documents using XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

 technologies such as entities
SGML entity
In the Standard Generalized Markup Language , an entity is a primitive data type, which associates a string with either a unique alias or an SGML reserved word . Entities are foundational to the organizational structure and definition of SGML documents...

, XPointer
XPointer
XPointer is a system for addressing components of XML based internet media.XPointer is divided among four specifications: a "framework" which forms the basis for identifying XML fragments, a positional element addressing scheme, a scheme for namespaces, and a scheme for XPath-based addressing...

 document referencing, and XSLT
XSLT
XSLT is a declarative, XML-based language used for the transformation of XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one. The new document may be serialized by the processor in standard XML syntax or in another format,...

 manipulations. (XPointer is patent-encumbered.)

The practice of 'remote loading'—including data, such as images, directly from other sites—is usually frowned upon because of the use of bandwidth and computing power required from the remote computer system (see Bandwidth theft). This is said to "tax" another server
Server (computing)
In the context of client-server architecture, a server is a computer program running to serve the requests of other programs, the "clients". Thus, the "server" performs some computational task on behalf of "clients"...

, and is often considered an example of leeching
Leech (computing)
In computing and specifically Internet, a leech or leecher is one who benefits, usually deliberately, from others' information or effort but does not offer anything in return, or makes only token offerings in an attempt to avoid being called a leech...

. Increased distribution of proxy server
Proxy server
In computer networks, a proxy server is a server that acts as an intermediary for requests from clients seeking resources from other servers. A client connects to the proxy server, requesting some service, such as a file, connection, web page, or other resource available from a different server...

s has the potential to turn this around and take advantage of transclusion to reduce redundant transmissions of the same data.

A major exception to this rule is web advertising
Advertising
Advertising is a form of communication used to persuade an audience to take some action with respect to products, ideas, or services. Most commonly, the desired result is to drive consumer behavior with respect to a commercial offering, although political and ideological advertising is also common...

, where advertisements supplied by an advertiser are published with other content by a publisher. An advertiser prefers to serve an advertisement and be able to detect when it was viewed, rather than have it served by the publisher and have to trust the publisher. (See also Hit counter, Web bug
Web bug
A web bug is an object that is embedded in a web page or e-mail and is usually invisible to the user but allows checking that a user has viewed the page or e-mail. One common use is in e-mail tracking. Alternative names are web beacon, tracking bug, and tag or page tag...

).

Mashups and meshups
Mashup (web application hybrid)
In Web development, a mashup is a Web page or application that uses and combines data, presentation or functionality from two or more sources to create new services...

 are a recent phenomenon similar to transclusion.

Server-side transclusion

Transclusion can also be accomplished on the server side, provided the server software includes this functionality. This can be done through multiple different technologies, including Server Side Includes
Server Side Includes
Server Side Includes is a simple interpreted server-side scripting language used almost exclusively for the Web.The most frequent use of SSI is to include the contents of one or more files into a web page on a web server...

 and markup entity references
SGML entity
In the Standard Generalized Markup Language , an entity is a primitive data type, which associates a string with either a unique alias or an SGML reserved word . Entities are foundational to the organizational structure and definition of SGML documents...

 resolved by the server software. It is a feature of substitution templates
Web template
A web template is a tool used to separate content from presentation in web design, and for mass-production of web documents. It is a basic component of a web template system.Web templates can be used to set up any type of website...

. Client-side transclusion is generally preferable as data transcluded into several pages can be cached by the client rather than sent out again for every page.

Transclusion of source code into HTML or wiki documents

In order to produce some kinds of software documents (external documents, such as design documents), it is often important to include source code fragments in the text. The transclusion of source code into the documents is an economic and elegant way of preserving the semantic consistency of the inserted code in relation to its source codebase.

See also

  • Compound document
    Compound document
    In computing, a compound document is a document type typically produced using word processing software, and is a regular text document intermingled with non-text elements such as spreadsheets, pictures, digital videos, digital audio, and other multimedia features...

  • Cross-reference
    Cross-reference
    A cross-reference is an instance within a document which refers to related or synonymous information elsewhere, usually within the same work. To cross-reference or to cross-refer is to make such connections. The term "cross-reference" is often abbreviated as x-ref, xref, or, in computer science,...

  • Macro
  • Object Linking and Embedding
    Object Linking and Embedding
    Object Linking and Embedding is a technology developed by Microsoft that allows embedding and linking to documents and other objects. For developers, it brought OLE Control eXtension , a way to develop and use custom user interface elements...

     (OLE)
  • Publish and Subscribe (Mac OS)
  • Single source publishing
    Single source publishing
    Single source publishing, also known as single sourcing, allows the same content to be used in different documents or in various formats. The labour-intensive and expensive work of editing need only be carried out once, on one document. Further transformations are carried out mechanistically, by...

  • Subroutine
    Subroutine
    In computer science, a subroutine is a portion of code within a larger program that performs a specific task and is relatively independent of the remaining code....


External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK