XInclude
Encyclopedia
XInclude is a generic mechanism for merging 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....

 documents, by writing inclusion tags in the "main" document to automatically include other documents or parts thereof. The resulting document becomes a single composite XML Information Set
XML Information Set
XML Information Set is a W3C specification describing an abstract data model of an XML document in terms of a set of information items...

. The XInclude mechanism can be used to incorporate content from either XML files or non-XML text files.

Example

For example, including the text file license.txt:

This document is published under GNU Free Documentation License

in an XHTML
XHTML
XHTML is a family of XML markup languages that mirror or extend versions of the widely-used Hypertext Markup Language , the language in which web pages are written....

 document:



xmlns:xi="http://www.w3.org/2001/XInclude">
...

...






gives:



xmlns:xi="http://www.w3.org/2001/XInclude">
...

...

This document is published under GNU Free Documentation License






The mechanism is similar to HTML
HTML
HyperText Markup Language is the predominant markup language for web pages. HTML elements are the basic building-blocks of webpages....

's <object> tag (which is specific to the HTML markup language
Markup language
A markup language is a modern system for annotating a text in a way that is syntactically distinguishable from that text. The idea and terminology evolved from the "marking up" of manuscripts, i.e. the revision instructions by editors, traditionally written with a blue pencil on authors' manuscripts...

), but the XInclude mechanism works with any XML format, such as SVG and XHTML
XHTML
XHTML is a family of XML markup languages that mirror or extend versions of the widely-used Hypertext Markup Language , the language in which web pages are written....

.

External links

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