HOME

TheInfoList



OR:

In
computer science Computer science is the study of computation, automation, and information. Computer science spans theoretical disciplines (such as algorithms, theory of computation, information theory, and automation) to Applied science, practical discipli ...
, transclusion is the inclusion of part or all of an
electronic document An electronic document is any electronic media content (other than computer programs or system files) that is intended to be used in either an electronic form or as printed output. Originally, any computer data were considered as something inter ...
into one or more other documents by
reference Reference is a relationship between objects in which one object designates, or acts as a means by which to connect to or link to, another object. The first object in this relation is said to ''refer to'' the second object. It is called a '' name'' ...
via
hypertext Hypertext is text displayed on a computer display or other electronic devices with references ( hyperlinks) to other text that the reader can immediately access. Hypertext documents are interconnected by hyperlinks, which are typically ...
. Transclusion is usually performed when the referencing document is displayed, and is normally automatic and transparent to the end user. The result of transclusion is a single integrated document made of parts assembled dynamically from separate sources, possibly stored on different computers in disparate places. Transclusion facilitates
modular design Modular design, or modularity in design, is a design principle that subdivides a system into smaller parts called ''modules'' (such as modular process skids), which can be independently created, modified, replaced, or exchanged with other modules ...
(using the
single source of truth In information science and information technology, single source of truth (SSOT) architecture, or single point of truth (SPOT) architecture, for information systems is the practice of structuring information models and associated data schemas ...
model, whether in
data In the pursuit of knowledge, data (; ) is a collection of discrete values that convey information, describing quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpret ...
,
code In communications and information processing, code is a system of rules to convert information—such as a letter, word, sound, image, or gesture—into another form, sometimes shortened or secret, for communication through a communicati ...
, or
content Content or contents may refer to: Media * Content (media), information or experience provided to audience or end-users by publishers or media producers ** Content industry, an umbrella term that encompasses companies owning and providing mas ...
): a
resource Resource refers to all the materials available in our environment which are technologically accessible, economically feasible and culturally sustainable and help us to satisfy our needs and wants. Resources can broadly be classified upon thei ...
is stored once and distributed for reuse in multiple documents. Updates or corrections to a resource are then reflected in any referencing documents. In systems where transclusion is not available, and in some situations where it is available but not desirable, substitution is often the complementary option, whereby a static copy of the single source of truth is integrated into the relevant document. Examples of both are provided by the ways in which they are both used in creating the content of Wikipedia, for example (see '' Wikipedia:Transclusion'' and '' Wikipedia:Substitution'' for more information). Substituted static copies introduce a different set of considerations for
version control In software engineering, version control (also known as revision control, source control, or source code management) is a class of systems responsible for managing changes to computer programs, documents, large web sites, or other collections o ...
than transclusion does, but they are sometimes necessary.
Ted Nelson Theodor Holm Nelson (born June 17, 1937) is an American pioneer of information technology, philosopher, and sociologist. He coined the terms ''hypertext'' and '' hypermedia'' in 1963 and published them in 1965. Nelson coined the terms '' trans ...
coined the term for his 1980 nonlinear book ''
Literary Machines ''Literary Machines'' (short title) is a book first published in 1981 by Ted Nelson, and republished nine times by 1993. It offers an extensive overview of Nelson's term "hypertext" as well as Nelson's Project Xanadu. It also includes other theo ...
'', but the idea of ''master copy and occurrences'' was applied 17 years before, in
Sketchpad Sketchpad (a.k.a. Robot Draftsman) is a computer program written by Ivan Sutherland in 1963 in the course of his PhD thesis, for which he received the Turing Award in 1988, and the Kyoto Prize in 2012. It pioneered human–computer interaction ...
.


Technical considerations


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 context. 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. To help overcome context sensitivity issues such as those aforementioned, systems capable of transclusion are often also capable of suppressing particular elements within the transcluded content. For example, Wikipedia can use tags such as "noinclude", "onlyinclude", and "includeonly" for this purpose. Typical examples of elements that often require such exceptions are document titles, footnotes, and cross-references; in this way, they can be automatically suppressed upon transclusion, without manual reworking for each instance.


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.


Origins

The concept of reusing file content began with computer programming languages:
COBOL COBOL (; an acronym for "common business-oriented language") is a compiled English-like computer programming language designed for business use. It is an imperative, procedural and, since 2002, object-oriented language. COBOL is primarily u ...
in 1960, followed by
BCPL BCPL ("Basic Combined Programming Language") is a procedural, imperative, and structured programming language. Originally intended for writing compilers for other languages, BCPL is no longer in common use. However, its influence is still ...
,
PL/I PL/I (Programming Language One, pronounced and sometimes written PL/1) is a procedural, imperative computer programming language developed and published by IBM. It is designed for scientific, engineering, business and system programming. I ...
, C, and by the 1990s, even FORTRAN.Alt URL
/ref> An
include directive Many programming languages and other computer files have a directive, often called include (sometimes copy or import), that causes the contents of the specified file to be inserted into the original file. These included files are called copybooks ...
allows common
source code In computing, source code, or simply code, is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the ...
to be reused while avoiding the pitfalls of Copy-and-paste-programming and
hard coding Hard coding (also hard-coding or hardcoding) is the software development practice of embedding data directly into the source code of a program or other executable object, as opposed to obtaining the data from external sources or generating it at ...
of constants. As with many innovations, a problem developed. Multiple include directives may provide the same content as another include directive, inadvertently causing repetitions of the same source code into the final result, resulting in an
error An error (from the Latin ''error'', meaning "wandering") is an action which is inaccurate or incorrect. In some usages, an error is synonymous with a mistake. The etymology derives from the Latin term 'errare', meaning 'to stray'. In statistics ...
.
Include guard In the C and C++ programming languages, an #include guard, sometimes called a macro guard, header guard or file guard, is a particular construct used to avoid the problem of ''double inclusion'' when dealing with the include directive. The ...
s help solve this by, after a single inclusion of content, thereafter omit the duplicate content. The idea of a single, reusable, source for information lead to concepts like:
Don't repeat yourself "Don't repeat yourself" (DRY) is a principle of software development aimed at reducing repetition of software patterns, replacing it with abstractions or using data normalization to avoid redundancy. The DRY principle is stated as "Every piece of ...
and the abstraction principle. A further use was found to make programs more
portable Portable may refer to: General * Portable building, a manufactured structure that is built off site and moved in upon completion of site and utility work * Portable classroom, a temporary building installed on the grounds of a school to provide ...
. Portable source code uses an include directive to specify a
standard library In computer programming, a standard library is the library made available across implementations of a programming language. These libraries are conventionally described in programming language specifications; however, contents of a language's a ...
, which contains system specific source code that varies with each computer environment.


History and implementation by Project Xanadu

Ted Nelson, who originated the words "hypertext" and "
hypermedia Hypermedia, an extension of the term hypertext, is a nonlinear medium of information that includes graphics, audio, video, plain text and hyperlinks. This designation contrasts with the broader term ''multimedia'', which may include non-interacti ...
", also coined the term "transclusion", in his 1980 book ''
Literary Machines ''Literary Machines'' (short title) is a book first published in 1981 by Ted Nelson, and republished nine times by 1993. It offers an extensive overview of Nelson's term "hypertext" as well as Nelson's Project Xanadu. It also includes other theo ...
''. Part of his proposal was the idea that
micropayment A micropayment is a financial transaction involving a very small sum of money and usually one that occurs online. A number of micropayment systems were proposed and developed in the mid-to-late 1990s, all of which were ultimately unsuccessful. A s ...
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 is text displayed on a computer display or other electronic devices with references ( hyperlinks) to other text that the reader can immediately access. Hypertext documents are interconnected by hyperlinks, which are typically ...
. 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 from a different location (which he calls ''transdelivery'') or an explicit
quotation A quotation is the repetition of a sentence, phrase, or passage from speech or text that someone has said or written. In oral speech, it is the representation of an utterance (i.e. of something that a speaker actually said) that is introduced by ...
that remains connected to its origins, (which he calls ''transquotation''). Some hypertext systems, including Ted Nelson's own Xanadu Project, 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.


Implementation on the Web

HTTP The Hypertext Transfer Protocol (HTTP) is an application layer protocol in the Internet protocol suite model for distributed, collaborative, hypermedia information systems. HTTP is the foundation of data communication for the World Wide We ...
, as a transmission protocol, has rudimentary support for transclusion via byte serving: specifying a byte range in an HTTP request message. Transclusion can occur either before (server-side) or after (client-side) transmission. For example: * An HTML document may be pre-composed by the server before delivery to the client using Server-Side Includes or another server-side application. * XML Entities or HTML Objects may be parsed by the client, which then requests the corresponding resources separately from the main document. * A web browser may cache elements using its own algorithms, which can operate without explicit directives in the document's markup. *
AngularJS AngularJS is a discontinued free and open-source JavaScript-based web framework for developing single-page applications. It was maintained mainly by Google and a community of individuals and corporations. It aimed to simplify both the development ...
employs transclusion for nested directive operation. Publishers of web content may object to the transclusion of material from their own web sites into other web sites, or they may require an agreement to do so. Critics of the practice may refer to various forms of inline linking as bandwidth theft or leeching. Other publishers may seek specifically to have their materials transcluded into other web sites, as in the form of web advertising, or as widgets like a hit counter or web bug. Mashups make use of transclusion to assemble resources or data into a new application, as by placing geo-tagged photos on an interactive map, or by displaying business metrics in an interactive
dashboard For business applications, see Dashboard (business). A dashboard (also called dash, instrument panel (IP), or fascia) is a control panel set within the central console of a vehicle or small aircraft. Usually located directly ahead of the drive ...
.


Client-side HTML

HTML The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaS ...
defines elements for client-side transclusion of
images An image is a visual representation of something. It can be two-dimensional, three-dimensional, or somehow otherwise feed into the visual system to convey information. An image can be an artifact, such as a photograph or other two-dimensiona ...
, scripts, stylesheets, other documents, and other types of media. HTML has relied heavily on client-side transclusion from the earliest days of the Web (so web pages could be displayed more quickly before multimedia elements finished loading), rather than embedding the raw data for such objects inline into a web page's markup. Through techniques such as
Ajax Ajax may refer to: Greek mythology and tragedy * Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea * Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris * ''Ajax'' (play), by the ancient Gree ...
, scripts associated with an HTML document can instruct a web browser to modify the document in-place, as opposed to the earlier technique of having to pull an entirely new version of the page from the web server. Such scripts may transclude elements or documents from a server after the web browser has rendered the page, in response to user input or changing conditions, for example. Future versions of HTML may support deeper transclusion of portions of documents using
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable. T ...
technologies such as
entities An entity is something that exists as itself, as a subject or as an object, actually or potentially, concretely or abstractly, physically or not. It need not be of material existence. In particular, abstractions and legal fictions are usually re ...
,
XPointer XPointer is a system for addressing components of XML-based Internet media. It is divided among four specifications: a "framework" that forms the basis for identifying XML fragments, a positional element addressing scheme, a scheme for namespaces, ...
document referencing, and
XSLT XSLT (Extensible Stylesheet Language Transformations) is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subseq ...
manipulations.
Proxy server In computer networking, a proxy server is a server application that acts as an intermediary between a client requesting a resource and the server providing that resource. Instead of connecting directly to a server that can fulfill a reques ...
s may employ transclusion to reduce redundant transmissions of commonly requested resources. A popular Front End Framework known as
AngularJS AngularJS is a discontinued free and open-source JavaScript-based web framework for developing single-page applications. It was maintained mainly by Google and a community of individuals and corporations. It aimed to simplify both the development ...
developed and maintained by
Google Google LLC () is an American Multinational corporation, multinational technology company focusing on Search Engine, search engine technology, online advertising, cloud computing, software, computer software, quantum computing, e-commerce, ar ...
has a directive callend ng-transclude that marks the insertion point for the transcluded DOM of the nearest parent directive that uses transclusion.


Server-side transclusion

Transclusion can be accomplished on the server side, as through
Server Side Includes Server Side Includes (SSI) is a simple interpreted server-side scripting language used almost exclusively for the World Wide Web. It is most useful for including the contents of one or more files into a web page on a web server (see below), using ...
and markup entity references resolved by the server software. It is a feature of substitution templates.


Transclusion of source code

Transclusion of source code into software design or reference materials lets source code be presented within the document, but not interpreted as part of the document, preserving the semantic consistency of the inserted code in relation to its source codebase.


Transclusion in content management

In
content management Content management (CM) is a set of processes and technologies that supports the collection, managing, and publishing of information in any form or medium. When stored and accessed via computers, this information may be more specifically referre ...
for single-source publishing, top-class
content management system A content management system (CMS) is computer software used to manage the creation and modification of digital content ( content management).''Managing Enterprise Content: A Unified Content Strategy''. Ann Rockley, Pamela Kostur, Steve Manning. New ...
s increasingly provide for transclusion and substitution.
Component content management system A component content management system (CCMS) is a content management system that manages content at a granular level (component) rather than at the document level. Each component represents a single topic, concept or asset (for example an image, t ...
s, especially, aim to take the
modular design Modular design, or modularity in design, is a design principle that subdivides a system into smaller parts called ''modules'' (such as modular process skids), which can be independently created, modified, replaced, or exchanged with other modules ...
principle to its optimal degree.
MediaWiki MediaWiki is a free and open-source wiki software. It is used on Wikipedia and almost all other Wikimedia websites, including Wiktionary, Wikimedia Commons and Wikidata; these sites define a large part of the requirement set for Media ...
provides transclusion and substitution and is a good off-the-shelf option for many smaller organizations (such as smaller nonprofits and
SMEs Superconducting magnetic energy storage (SMES) systems store energy in the magnetic field created by the flow of direct current in a superconducting coil which has been cryogenically cooled to a temperature below its superconducting critical ...
) that may not have the overhead budget for other commercial options; for details, see ''
Component content management system A component content management system (CCMS) is a content management system that manages content at a granular level (component) rather than at the document level. Each component represents a single topic, concept or asset (for example an image, t ...
''.


See also

* * * and ''content reuse'' * * * * * *


References


Further reading

* * * * * * * * * * * * * *


External links

{{Wiktionary, transclusion * Ted Nelson:
Transclusion: Fixing Electronic Literature
'—on Google Tech Talks, 29 January 2007. HTML Hypertext Metadata Ted Nelson