XInclude
XInclude is a generic mechanism for merging XML documents, by writing inclusion tags in the "main" document to automatically include other documents or parts thereof.{{cite web
|url=http://www.w3.org/TR/xinclude/#examples
|title=XML Inclusions (XInclude) Version 1.0 (Second Edition), Appendix C: Examples (non-normative)
|author1=J. Marsh |author2=D. Orchard |author3=Daniel Veillard |publisher=World Wide Web Consortium
|access-date=2007-06-28
}} The resulting document becomes a single composite XML Information Set. The XInclude mechanism can be used to incorporate content from either XML files or non-XML text files.
XInclude is not natively supported in Web browsers, but may be partially achieved by using some extra JavaScript code.
{{cite web
|url=https://developer.mozilla.org/en/docs/XInclude
|title=XInclude
|author1=((Brettz9))
|author2=rolfedh|author3=klez|author4=teoli
|display-authors=1
|publisher=Mozilla Developer Network
}}
Example
For example, including the text file license.txt
:
This document is published under GNU Free Documentation License
in an XHTML 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's <object>
tag (which is specific to the HTML markup language), but the XInclude mechanism works with any XML format, such as SVG and XHTML.
See also
References
External links
- [http://www.w3.org/TR/xinclude/ XInclude Standard]
- [http://www.xml.com/pub/a/2007/03/28/xinclude-processing-in-xslt-with-xipr.html XInclude with XSLT]
- [http://xerces.apache.org/xerces2-j/faq-xinclude.html Using XInclude in Xerces]
- [https://www.xml.com/pub/a/2002/07/31/xinclude.html Using XInclude] article by Elliotte Rusty Harold
{{W3C standards}}
{{DEFAULTSORT:Xinclude}}