Jump to content

Transclusion: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
PixelBot (talk | contribs)
m r2.7.2) (Robot: Removing zh:嵌入包含
Line 18: Line 18:


==History and implementation by Project Xanadu==
==History and implementation by Project Xanadu==
Nelson (who had also originated the words "hypertext" and "[[hypermedia]]") coined the term "transclusion" in his 1982 book, ''[[Literary Machines]]''. Part of his proposal was the idea that [[micropayment]]s could be automatically exacted from the reader for all the text, no matter how many snippets of content are taken from various places.
Ted Nelson (who had also originated the words "hypertext" and "[[hypermedia]]") coined the term "transclusion" in his 1982 book, ''[[Literary Machines]]''. Part of his proposal was the idea that [[micropayment]]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<ref>Theodor H. Nelson, "A File Structure for the Complex, the Changing and the Indeterminate." Proceedings of the ACM 20th National Conference (1965), pp. 84-100</ref> of [[hypertext]]; he also interprets the notion of "trails" in [[Vannevar Bush]]'s 1945 essay [[As We May Think]] as describing transclusion rather than [[hyperlink]]s.<ref name="btf">Theodor Holm Nelson and Robert Adamson Smith: [http://xanadu.com/XanaduSpace/btf.htm Back To The Future: Hypertext the Way It Used To Be]</ref>
However, according to Nelson, the concept of transclusion had already formed part of his 1965 description<ref>Theodor H. Nelson, "A File Structure for the Complex, the Changing and the Indeterminate." Proceedings of the ACM 20th National Conference (1965), pp. 84-100</ref> of [[hypertext]]; he also interprets the notion of "trails" in [[Vannevar Bush]]'s 1945 essay [[As We May Think]] as describing transclusion rather than [[hyperlink]]s.<ref name="btf">Theodor Holm Nelson and Robert Adamson Smith: [http://xanadu.com/XanaduSpace/btf.htm Back To The Future: Hypertext the Way It Used To Be]</ref>

Revision as of 12:49, 24 April 2012

B is transcluded in the document A

In computer science, 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, 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.

Transclusion is usually performed on demand at the time one document referencing another is opened, and is normally automatic and transparent to the end user. The result appears to be a single integrated document, even though its parts were assembled on-the-fly from several separate documents which may have come from different computers located in different places.

The term was coined by hypertext pioneer Ted Nelson in 1982.

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 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.

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

Ted Nelson (who had also originated the words "hypertext" and "hypermedia") coined the term "transclusion" in his 1982 book, Literary Machines. Part of his proposal was the idea that micropayments 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[1] of hypertext; he also interprets the notion of "trails" in Vannevar Bush's 1945 essay As We May Think as describing transclusion rather than hyperlinks.[2]

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 which remains connected to its origins" (which he calls "transquotation").[2]

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).[3] 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.

Implementations on the Web

HTML

At present, transclusion in HTML is somewhat limited by lack of standards support in web browsers. Although all graphical browsers can transclude an image, 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 can achieve a similar result across all modern, JavaScript-enabled browsers.

Future versions of HTML may support deeper transclusion of portions of documents using XML technologies such as entities, XPointer document referencing, and XSLT 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, and is often considered an example of leeching. Increased distribution of proxy servers 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, 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).

Mashups and meshups 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 and markup entity references resolved by the server software. It is a feature of substitution templates. 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

References

  1. ^ Theodor H. Nelson, "A File Structure for the Complex, the Changing and the Indeterminate." Proceedings of the ACM 20th National Conference (1965), pp. 84-100
  2. ^ a b Theodor Holm Nelson and Robert Adamson Smith: Back To The Future: Hypertext the Way It Used To Be
  3. ^ The Little Transquoter Xanadu.com.au

Further reading

  • Di Iorio, A.; Vitali, F. (2003). "A Xanalogical Collaborative Editing Environment" (PDF). Proceedings of the Second International Workshop of Web Document Analysis 2003 (WDA2003). Edinburgh, UK. {{cite conference}}: Unknown parameter |booktitle= ignored (|book-title= suggested) (help); Unknown parameter |month= ignored (help)
  • Kolbitsch, J.; Maurer, H. (2006). "Transclusions in an HTML-Based Environment". Journal of Computing and Information Technology. 14 (2): 161–174. doi:10.2498/cit.2006.02.07. {{cite journal}}: Unknown parameter |month= ignored (help)
  • Kolbitsch, J. (2005). "Fine-Grained Transclusions of Multimedia Documents in HTML". Journal of Universal Computer Science. 11 (6). {{cite journal}}: Unknown parameter |month= ignored (help)
  • Krottmaier, H. (2002). "Transcluded Documents: Advantages of Reusing Document Fragments" (PDF). Proceedings of the 6th International ICCC/IFIP Conference on Electronic Publishing (ELPUB2002). Czech Republic: Karlovy Vary. pp. 359–367. {{cite conference}}: Unknown parameter |booktitle= ignored (|book-title= suggested) (help)
  • Krottmaier, H.; D., Helic (2002). "Issues of Transclusions" (PDF). Proceedings of the World Conference on E-Learning in Corporate, Government, Healthcare, & Higher Education (E-Learn 2002). Montreal, Canada. pp. 1730–1733. {{cite conference}}: Unknown parameter |booktitle= ignored (|book-title= suggested) (help)
  • Krottmaier, H.; Maurer, H. (2001). "Transclusions in the 21st Century" (PDF, HTML, PostScript). Journal of Universal Computer Science. 7 (12): 1125–1136. {{cite journal}}: Unknown parameter |month= ignored (help)
  • Moore, A. (2001). "Personally tailored teaching in WHURLE using conditional translucion". Proceedings of the Twelfth ACM Conference on Hypertext and Hypermedia. Aarhus, Danmark. pp. 163–164. {{cite conference}}: Unknown parameter |booktitle= ignored (|book-title= suggested) (help); Unknown parameter |coauthors= ignored (|author= suggested) (help)
  • Nelson, T. H. (1981). Literary Machines. Mindful Press.
  • Nelson, T. H. (1995). "The Heart of Connection: Hypermedia Unified by Transclusion". Communications of the ACM. 38 (8): 31–33. doi:10.1145/208344.208353.
  • Nelson, T. H. (1996). "Generalized Links, Micropayment and Transcopyright". Almaden Research Center.
  • Nelson, T. H. (1998). "Transcopyright: Pre-Permission for Virtual Republishing".
  • Nelson, T. H. (1999). "Xanalogical Structure, Needed Now More than Ever: Parallel Documents, Deep Links to Content, Deep Versioning and Deep Re-Use". ACM Computing Surveys. 31 (4es): 33. doi:10.1145/345966.346033.
  • Pam, A. (1997). "Fine-Grained Transclusion in the Hypertext Markup Language" (Text). Internet Draft.
  • Wilde, E.; Lowe, D. (2002). "XML Linking Language". XPath, XLink, XPointer, and XML: A Practical Guide to Web Hyperlinking and Transclusion. Addison-Wesley Professional. pp. 169–198. {{cite book}}: |format= requires |url= (help); External link in |chapterurl= (help); Unknown parameter |chapterurl= ignored (|chapter-url= suggested) (help)