<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="xmlspec-ie.xsl"?>
<!DOCTYPE spec PUBLIC "-//W3C//DTD Specification Version 2.0//EN"
                      "xmlspec.dtd" [
	<!ENTITY year "2004">
	<!ENTITY month "September">
	<!ENTITY MM "09">
	<!ENTITY day "30">
	<!ENTITY DD "30">
	<!ENTITY MMDD "&MM;&DD;">
	<!ENTITY status "PR">
	<!ENTITY status-lc "pr">
	<!ENTITY includensuri "http://www.w3.org/2001/XInclude">
	<!ENTITY XMLCore-IPR "http://www.w3.org/2002/08/xmlcore-IPR-statements">
	<!ENTITY internalXInclude "http://www.w3.org/XML/Group/2004/07/&status;-xinclude">
	<!ENTITY externalXInclude "http://www.w3.org/TR/&year;/&status;-xinclude-&year;&MMDD;">
	<!ENTITY XInclude "&externalXInclude;">
	<!-- DTD Extensions -->
	<!ENTITY % local.list.class "|options-list">
	<!ELEMENT options-list (item+)>
	<!ATTLIST options-list
	diff (chg | add | del | off) #IMPLIED
		role NMTOKEN #IMPLIED
		id ID #IMPLIED
		spacing (normal | compact) #IMPLIED
>
	<!ATTLIST resolution
	href CDATA #IMPLIED
>
	<!ENTITY % local.loc.class "|loc-content">
	<!ELEMENT loc-content (#PCDATA | acronym)*>
	<!ATTLIST loc-content
	href CDATA #IMPLIED
>
	<!ELEMENT acronym (#PCDATA)>
	<!ATTLIST acronym
	lang CDATA #IMPLIED
		title CDATA #IMPLIED
>
	<!ENTITY nbsp "&#160;">
	<!-- nonbreakable space, U+00A0 -->
	<!ENTITY copy "&#169;">
	<!-- copyright sign, U+00A9 ISOnum -->
	<!ENTITY reg "&#174;">
	<!-- registered sign = registered trade mark sign,
                                  U+00AE ISOnum -->
]>
<spec w3c-doctype="&status-lc;">
	<header>
		<title>XML Inclusions (XInclude)</title>
		<version>Version 1.0</version>
		<w3c-designation>xinclude-&year;&MMDD;</w3c-designation>
		<w3c-doctype>W3C Proposed Recommendation</w3c-doctype>
		<pubdate>
			<day>&day;</day>
			<month>&month;</month>
			<year>&year;</year>
		</pubdate>
		<publoc>
			<loc href="&XInclude;/">&XInclude;/</loc>
		</publoc>
		<altlocs>
			<loc href="&XInclude;/&status;-xinclude-&year;&MMDD;.xml">XML</loc>
			<loc href="&XInclude;/&status;-xinclude-&year;&MMDD;-diff.html">diff HTML</loc>
		</altlocs>
		<latestloc>
			<loc href="http://www.w3.org/TR/xinclude/">http://www.w3.org/TR/xinclude/</loc>
		</latestloc>
		<prevlocs>
			<loc href="http://www.w3.org/TR/2004/CR-xinclude-20040413/">http://www.w3.org/TR/2004/CR-xinclude-20040413/</loc>
			<loc href="http://www.w3.org/TR/2003/WD-xinclude-20031110/">http://www.w3.org/TR/2003/WD-xinclude-20031110/</loc>
			<loc href="http://www.w3.org/TR/2002/CR-xinclude-20020917/">http://www.w3.org/TR/2002/CR-xinclude-20020917/</loc>
			<loc href="http://www.w3.org/TR/2002/CR-xinclude-20020221/">http://www.w3.org/TR/2002/CR-xinclude-20020221/</loc>
			<loc href="http://www.w3.org/TR/2001/WD-xinclude-20010516/">http://www.w3.org/TR/2001/WD-xinclude-20010516/</loc>
			<loc href="http://www.w3.org/TR/2000/WD-xinclude-20001026/">http://www.w3.org/TR/2000/WD-xinclude-20001026/</loc>
			<loc href="http://www.w3.org/TR/2000/WD-xinclude-20000717">http://www.w3.org/TR/2000/WD-xinclude-20000717</loc>
			<loc href="http://www.w3.org/TR/2000/WD-xinclude-20000322">http://www.w3.org/TR/2000/WD-xinclude-20000322</loc>
			<loc href="http://www.w3.org/TR/1999/NOTE-xinclude-19991123">http://www.w3.org/TR/1999/NOTE-xinclude-19991123</loc>
		</prevlocs>
		<authlist>
			<author>
				<name>Jonathan Marsh</name>
				<affiliation>Microsoft</affiliation>
				<email href="mailto:jmarsh@microsoft.com">jmarsh@microsoft.com</email>
			</author>
			<author>
				<name>David Orchard</name>
				<affiliation>BEA Systems</affiliation>
				<email href="mailto:dorchard@bea.com">dorchard@bea.com</email>
			</author>
		</authlist>
<!--
		<copyright>
			<p role="copyright">
				<loc href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">
			Copyright</loc>&nbsp; &copy; 2004 <loc-content href="http://www.w3.org/">
					<acronym title="World Wide Web Consortium">W3C</acronym>
				</loc-content>
				<sup>&reg;</sup>
			(<loc-content href="http://www.csail.mit.edu/">
					<acronym title="Massachusetts Institute of Technology">MIT</acronym>
				</loc-content>, <loc-content href="http://www.ercim.org/">
					<acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym>
				</loc-content>, <loc href="http://www.keio.ac.jp/">Keio</loc>), All Rights Reserved. 
			W3C <loc href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</loc>, 
			<loc href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</loc>, and 
			<loc href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</loc> 
			rules apply.</p>
		</copyright>
-->
		<status>
			<p>
				<emph>This section describes the status of this document at the time of its 
			publication. Other documents may supersede this document. A list of current 
			W3C publications and the latest revision of this technical report can be found 
			in the <loc href="http://www.w3.org/TR/">W3C technical reports index</loc> at 
			http://www.w3.org/TR/.</emph>
			</p>
			<p>This document is a <loc href="http://www.w3.org/2003/06/Process-20030618/process.html#RecsPR">Proposed 
			Recommendation (PR)</loc> of the W3C. This document has been produced by the 
			<loc href="http://www.w3.org/XML/Core/">W3C XML Core Working Group</loc> as part 
			of the <loc href="http://www.w3.org/XML/Activity">XML Activity</loc>.</p>
			<p>W3C Advisory Committee Members are invited to send formal review comments 
			to the W3C Team until 29 October 2004. Review comments should be sent to 
			<loc href="mailto:xinclude-team-review@w3.org">xinclude-team-review@w3.org</loc>; 
			comments sent there will be made available to members after the review 
			period ends.  People wanting their comments visible to members sooner, or to 
			be archived publicly, can send a cc to the ac-forum list or to www-archive@w3.org 
			as appropriate. The public is invited to send comments to the public mailing 
			list <loc href="mailto:www-xml-xinclude-comments@w3.org">www-xml-xinclude-comments@w3.org</loc> 
			(<loc href="http://lists.w3.org/Archives/Public/www-xml-xinclude-comments/">archive</loc>). 
			After the review the Director will announce the document's disposition. This 
			announcement should not be expected sooner than 14 days after the end of the 
			review.</p>
			<p>This document is based upon the <loc href="http://www.w3.org/TR/2004/CR-xinclude-20040413/">XInclude Candidate 
			Recommendation of 13 April 2004</loc>.  Feedback received during that review 
			resulted in clarifications but no major changes.  The XML Core Working Group 
			believes that this specification addresses all Last Call and Candidate 
			Recommendation issues. Known implementations are documented in the 
			<loc href="http://www.w3.org/XML/2004/xinclude-implementation/report.html">XInclude 
			Implementation Report</loc>.  A <loc href="http://www.w3.org/XML/Test/XInclude/">test 
			suite</loc> is also available.</p>
			<p>This document has been produced under the 
			<loc href="http://www.w3.org/TR/2002/NOTE-patent-practice-20020124">24 January 
			2002 CPP</loc> as amended by the <loc href="http://www.w3.org/2004/02/05-pp-transition">W3C 
			Patent Policy Transition Procedure</loc>.  An individual who has actual knowledge 
			of a patent which the individual believes contains Essential Claim(s) 
			with respect to this specification should disclose the information in 
			accordance with <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section 
			6 of the W3C Patent Policy</loc>.  Documentation of intellectual property 
			possibly relevant to this specification may be found at the 
			<loc href="http://www.w3.org/2002/08/xmlcore-IPR-statements">Working Group's 
			public IPR disclosure page</loc>.</p>
			<p>Publication as a Proposed Recommendation does not imply endorsement by 
			the W3C membership. This is a draft document and may be updated, replaced 
			or obsoleted by other documents at any time. It is inappropriate to cite 
			this document as other than work in progress.</p>
			<p>A list of current W3C Recommendations and other technical documents 
        can be found at <loc href="http://www.w3.org/TR/">http://www.w3.org/TR/</loc>.</p>
		</status>
		<abstract>
			<p>This document specifies a processing model and syntax for general 
			purpose inclusion.  Inclusion is accomplished by merging a 
			number of XML information sets into a single composite infoset.  
			Specification of the XML documents (infosets) to be merged and 
			control over the merging process is expressed in XML-friendly 
			syntax (elements, attributes, URI references).</p>
		</abstract>
		<langusage>
			<language id="EN">English</language>
		</langusage>
		<revisiondesc>
			<slist>
				<sitem>February 28, 2000: First Working Draft.</sitem>
			</slist>
		</revisiondesc>
	</header>
	<body>
		<div1 id="intro">
			<head>Introduction</head>
			<p>Many programming languages provide an inclusion mechanism to 
			facilitate modularity.  Markup languages also often have need of 
			such a mechanism.  This specification introduces a generic mechanism
			for merging XML documents (as represented by their information sets)
			for use by applications that need such a facility.  The syntax 
			leverages existing XML constructs - elements, attributes, and URI 
			references.</p>
			<div2 id="rel-xlink">
				<head>Relationship to XLink</head>
				<p>XInclude differs from the linking features described in the 
				<bibref ref="XLink"/>, specifically links with the 
				attribute value <code>show="embed"</code>.  Such links provide
				a media-type independent syntax for indicating that a resource
				is to be embedded graphically within the display of the document.
				XLink does not specify a specific processing model, but simply
				facilitates the detection of links and recognition of associated 
				metadata by a higher level application.</p>
				<p>XInclude, on the other hand, specifies a media-type specific
				(XML into XML) transformation.  It defines a specific processing
				model for merging information sets.  XInclude processing occurs
				at a low level, often by a generic XInclude processor which makes 
				the resulting information set available to higher level 
				applications.</p>
				<p>Simple information item inclusion as described in this specification 
				differs from transclusion, which preserves contextual 
				information such as style.</p>
			</div2>
			<div2 id="rel-extent">
				<head>Relationship to XML External Entities</head>
				<p>There are a number of differences between XInclude and
				<bibref ref="XML"/> or <bibref ref="XML11"/> external entities 
				which make them complementary technologies.</p>
				<p>Processing of external entities (as with the rest of DTDs)
				occurs at parse time.  XInclude operates on information sets 
				and thus is orthogonal to parsing.</p>
				<p>Declaration of external entities requires a DTD or internal subset.
				This places a set of dependencies on inclusion, for instance, the syntax
				for the DOCTYPE declaration requires that the document element be named - 
				orthogonal to inclusion in many cases.  Validating parsers
				must have a complete content model defined.  XInclude is orthogonal 
				to validation and the name of the document element.</p>
				<p>External entities provide a level of indirection - the external
				entity must be declared and named, and separately invoked.
				XInclude uses direct references.  Applications which generate 
				XML output incrementally can benefit from not having to pre-declare 
				inclusions.</p>
				<p>Failure to load an external entity is normally a fatal error. 
				XInclude allows the author to provide default content that will be 
				used if the remote resource cannot be loaded.</p>
				<p>The syntax for an internal subset is cumbersome to many authors
				of simple well-formed XML documents.  XInclude syntax is based on
				familiar XML constructs.</p>
			</div2>
			<div2 id="rel-dtd">
				<head>Relationship to DTDs</head>
				<p>XInclude defines no relationship to DTD validation.  XInclude
				describes an infoset-to-infoset transformation and not a change
				in XML parsing behavior.  XInclude does not define a
				mechanism for DTD validation of the resulting infoset.</p>
			</div2>
			<div2 id="rel-xsd">
				<head>Relationship to XML Schemas</head>
				<p>XInclude defines no relationship to the augmented infosets
				produced by applying an XML schema.  Such an augmented infoset
				can be supplied as the input infoset, or such augmentation might
				be applied to the infoset resulting from the inclusion.</p>
			</div2>
			<div2 id="rel-inc">
				<head>Relationship to Grammar-Specific Inclusions</head>
				<p>Special-purpose inclusion mechanisms have been introduced
				into specific XML grammars.  XInclude provides a generic mechanism 
				for recognizing and processing inclusions, and as such can offer
				a simpler overall authoring experience, greater performance, and 
				less code redundancy.</p>
			</div2>
		</div1>
		<div1 id="terminology">
			<head>Terminology</head>
			<p>
				<termdef id="dt-must" term="Must, May, etc.">The key words 
			<term>must</term>, <term>must not</term>, <term>required</term>,
			<term>shall</term>, <term>shall not</term>, <term>should</term>, 
			<term>should not</term>, <term>recommended</term>, <term>may</term>, 
			and <term>optional</term> in this specification are to be interpreted 
			as described in <bibref ref="RFC2119"/>.</termdef>
			</p>
			<p>
				<termdef id="dt-infoset" term="infoset">The term <term>information 
			set</term> refers to the output of an <bibref ref="XML"/> or 
			<bibref ref="XML11"/> processor, expressed as a 
			collection of information items and properties as defined by the 
			<bibref ref="XMLIS"/> specification.</termdef>  In this document 
			the term <emph>infoset</emph> is used as a synonym for 
			<emph>information set</emph>.</p>
			<p>
				<termdef id="dt-error" term="fatal error">The term <term>fatal 
			error</term> refers to the presence of factors that prevent normal 
			processing from continuing.</termdef>&#32;
			<termdef id="dt-resource-error" term="resource error">The term 
			<term>resource error</term> refers to a failure of an attempt to
			fetch a resource from a URL.</termdef>  XInclude 
			processors <termref def="dt-must">must</termref> stop processing 
			when encountering errors other than 
			<termref def="dt-resource-error">resource errors</termref>, which
			<termref def="dt-must">must</termref> be handled as described in 
			<specref ref="fallback"/>.</p>
		</div1>
		<div1 id="syntax">
			<head>Syntax</head>
			<p>XInclude defines a namespace associated with the URI 
			<code>&includensuri;</code>. The XInclude namespace contains two 
			elements with the local names <code>include</code> and 
			<code>fallback</code>.  For convenience, within this specification 
			these elements are referred to as <code>xi:include</code> and 
			<code>xi:fallback</code> respectively.</p>
			<p>The following (non-normative) XML schema <bibref ref="XMLSchemas"/>
			illustrates the content model of the <code>xi</code> namespace:</p>
			<eg><![CDATA[
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           xmlns:xi="http://www.w3.org/2001/XInclude"
           targetNamespace="http://www.w3.org/2001/XInclude"
           finalDefault="extension">

  <xs:element name="include" type="xi:includeType" />

  <xs:complexType name="includeType" mixed="true">
    <xs:choice minOccurs='0' maxOccurs='unbounded' >
      <xs:element ref='xi:fallback' />
      <xs:any namespace='##other' processContents='lax' />
      <xs:any namespace='##local' processContents='lax' />
    </xs:choice>
    <xs:attribute name="href" use="optional" type="xs:anyURI"/>
    <xs:attribute name="parse" use="optional" default="xml"
                  type="xi:parseType" />
    <xs:attribute name="xpointer" use="optional" type="xs:string"/>
    <xs:attribute name="encoding" use="optional" type="xs:string"/>
    <xs:attribute name="accept" use="optional" type="xs:string"/>
    <xs:attribute name="accept-language" use="optional" type="xs:string"/>
    <xs:anyAttribute namespace="##other" processContents="lax"/>
  </xs:complexType>

  <xs:simpleType name="parseType">
    <xs:restriction base="xs:token">
      <xs:enumeration value="xml"/>
      <xs:enumeration value="text"/>
    </xs:restriction>
  </xs:simpleType>
  
  <xs:element name="fallback" type="xi:fallbackType" />

  <xs:complexType name="fallbackType" mixed="true">
    <xs:choice minOccurs="0" maxOccurs="unbounded">
      <xs:element ref="xi:include"/>
      <xs:any namespace="##other" processContents="lax"/>
      <xs:any namespace="##local" processContents="lax"/>
    </xs:choice>
    <xs:anyAttribute namespace="##other" processContents="lax" />
  </xs:complexType>

</xs:schema>
]]></eg>
			<div2 id="include_element">
				<head>xi:include Element</head>
				<p>The <code>xi:include</code> element has the following 
				attributes:</p>
				<glist>
					<gitem>
						<label>href</label>
						<def>
							<p>A value which, after appropriate escaping (see <specref ref="IRIs"/>)
							has been performed, results in a URI reference or an 
							<termref def="dt-IRI">IRI reference</termref> 
							specifying the location of the resource to 
							include.  The <att>href</att> attribute is optional; the 
							absence of this attribute is the same as specifying 
							<att>href=""</att>, that is, the reference is to the same 
							document.  If the <att>href</att> attribute is absent when 
							<att>parse="xml"</att>, the <att>xpointer</att> attribute 
							<termref def="dt-must">must</termref> be present.  Fragment 
							identifiers <termref def="dt-must">must not</termref> be used; 
							their appearance is a <termref def="dt-error">fatal error</termref>. 
							A value that results in a syntactically invalid URI or IRI 
							<termref def="dt-must">should</termref> 
							be reported as a <termref def="dt-error">fatal error</termref>, but 
							some implementations may find it impractical to distinguish this 
							case from a <termref def="dt-resource-error">resource error</termref>.</p>
							<note>
								<p>A URI ending in <code>#</code> is considered by <bibref ref="RFC2396"/> 
								to have an empty fragment identifier.  Such a URI would result in a 
								<termref def="dt-error">fatal error</termref> as described above.</p>
							</note>
							<note>
								<p>A key feature of XInclude is that it allows a resource to be cast 
								to a user-specifed type for inclusion (XML or text).  The returned 
								media type is therefore essentially ignored for the purposes of 
								inclusion processing, and the syntax of the fragment identifier 
								of the returned media type will generally not be applicable to 
								the user-specified type.  For <att>parse="xml"</att> inclusions, 
								sub-resources are identified by a separate <att>xpointer</att> 
								attribute, which is applied after the casting takes place.  While
							 	this does not prevent subresources of XML documents to be 
								identified by URI (See <loc href="http://www.w3.org/TR/webarch/#identification">Architecture
								of the World Wide Web [Identification]</loc>), it does preclude
								the use of these identifiers directly within XInclude.</p>
							</note>
						</def>
					</gitem>
					<gitem>
						<label>parse</label>
						<def>
							<p>Indicates whether to include the resource as parsed XML or as 
							text.  The parse attribute allows XInclude to give the author of 
							the including document priority over the server of the included 
							document in terms of how to process the included content.  A value 
							of "xml" indicates that the resource <termref def="dt-must">must</termref> 
							be parsed as XML and the infosets merged.  A value of "text" indicates 
							that the resource <termref def="dt-must">must</termref> be included 
							as the character information items.  This attribute is optional.  
							When omitted, the value of "xml" is implied (even in the absence of 
							a default value declaration).  Values other than "xml" and "text" 
							are a <termref def="dt-error">fatal error</termref>.</p>
							<note>
								<p>For interoperability between validating and non-validating 
	       						systems, whitespace should not appear in the parse attribute.</p>
							</note>
						</def>
					</gitem>
					<gitem>
						<label>xpointer</label>
						<def>
							<p>When <att>parse="xml"</att>, the XPointer (see <bibref ref="XPCore"/>) 
							contained in the <att>xpointer</att> attribute is evaluated to identify 
							a portion of the resource to include. This attribute is optional; when 
							omitted, the entire resource is included.  The <att>xpointer</att> 
							attribute <termref def="dt-must">must not</termref> be present when 
							<att>parse="text"</att>. If the <att>xpointer</att> attribute is absent, 
							the <att>href</att> attribute <termref def="dt-must">must</termref> be 
							present.</p>
							<note>
								<p>Since the <att>xpointer</att> attribute is not a URI reference, 
								%-escaping must not appear in the XPointer, nor is there any need 
								for a processor to apply or reverse such escaping.</p>
							</note>
						</def>
					</gitem>
					<gitem>
						<label>encoding</label>
						<def>
							<p>When <att>parse="text"</att>, it is sometimes impossible to
							correctly detect the encoding of the text resource.  The 
							<att>encoding</att>	attribute specifies how the resource is to 
							be translated.  The value of this attribute is an EncName as 
							defined in XML specification, section 4.3.3, rule [81].  
							The <att>encoding</att> attribute has no effect when 
							<att>parse="xml"</att>.</p>
						</def>
					</gitem>
					<gitem>
						<label>accept</label>
						<def>
							<p>The value of the <att>accept</att> attribute may be used by 
							the XInclude processor to aid in content negotiation. When the
							XInclude processor fetches a resource via HTTP, it 
							<termref def="dt-must">should</termref> place the 
							value of the <att>accept</att> attribute, if one exists, in 
							the HTTP request as an <code>Accept</code> header as 
							described in section 14.1 of <bibref ref="RFC2616"/>.  Values containing 
							characters outside the range #x20 through #x7E are disallowed
							in HTTP headers, and <termref def="dt-must">must</termref> 
							be flagged as <termref def="dt-error">fatal errors</termref>.</p>
						</def>
					</gitem>
					<gitem>
						<label>accept-language</label>
						<def>
							<p>The value of the <att>accept-language</att> attribute may be used by 
							the XInclude processor to aid in content negotiation. When the
							XInclude processor fetches a resource via HTTP, it 
							<termref def="dt-must">should</termref> place the 
							value of the <att>accept-language</att> attribute, if one exists, in 
							the HTTP request as an <code>Accept-Language</code> header as 
							described in section 14.4 of <bibref ref="RFC2616"/>.  Values containing 
							characters outside the range #x20 through #x7E are disallowed
							in HTTP headers, and <termref def="dt-must">must</termref> 
							be flagged as <termref def="dt-error">fatal errors</termref>.</p>
						</def>
					</gitem>
				</glist>
				<p>Attributes other than those listed above <termref def="dt-must">may</termref> 
				be placed on the <code>xi:include</code> element.  Unprefixed 
				attribute names are reserved for future versions of this specification, 
				and <termref def="dt-must">must</termref> be ignored by XInclude 1.0 
				processors.</p>
				<p>The <emph role="infoset-property">children</emph> property of the 
				<code>xi:include</code> element <termref def="dt-must">may</termref> 
				include a single <code>xi:fallback</code> element; the appearance of 
				more than one <code>xi:fallback</code> element, an 
				<code>xi:include</code> element, or any other element from the 
				XInclude namespace is a <termref def="dt-error">fatal error</termref>.
				Other content (text, processing instructions, comments, elements not 
				in the XInclude namespace, descendants of child elements) is not 
				constrained by this specification and is ignored by the XInclude 
				processor, that is, it has no effect on include processing, and does 
				not appear in the <emph role="infoset-property">children</emph> 
				properties of the result infoset. Such content might be used by 
				applications analyzing a pre-inclusion infoset, or be made available 
				to an application post-inclusion through means other than the normal 
				infoset properties.</p>
				<p>The following (non-normative) DTD fragment illustrates a sample 
  				declaration for the <code>xi:include</code> element:</p>
				<eg>&lt;!ELEMENT xi:include (xi:fallback?)&gt;
&lt;!ATTLIST xi:include
    xmlns:xi        CDATA       #FIXED    "&includensuri;"
    href            CDATA       #IMPLIED
    parse           (xml|text)  "xml"
    xpointer        CDATA       #IMPLIED
    encoding        CDATA       #IMPLIED
    accept          CDATA       #IMPLIED
    accept-language CDATA       #IMPLIED
&gt;</eg>
			</div2>
			<div2 id="fallback_element">
				<head>xi:fallback Element</head>
				<p>The <code>xi:fallback</code> element appears as a child
				of an <code>xi:include</code> element.  It provides a mechanism
				for recovering from missing resources.  When a 
				<termref def="dt-resource-error">resource error</termref> is 
				encountered, the <code>xi:include</code> element is replaced 
				with the contents of the <code>xi:fallback</code> element.  
				If the <code>xi:fallback</code> element is empty, the 
				<code>xi:include</code> element is removed from the result.
				If the <code>xi:fallback</code> element is missing, a
				<termref def="dt-resource-error">resource error</termref> results 
				in a <termref def="dt-error">fatal error</termref>.</p>
				<p>The <code>xi:fallback</code> element can appear only as a 
				child of an <code>xi:include</code> element.  It is a
				<termref def="dt-error">fatal error</termref> for an <code>xi:fallback</code>
				element to appear in a document anywhere other than as the direct child
				of the <code>xi:include</code> (before inclusion processing on 
				the contents of the element.)  It is a <termref def="dt-error">fatal error</termref>
				for the <code>xi:fallback</code> element to contain any elements from the 
				XInclude namespace other than <code>xi:include</code>.</p>
				<p>Attributes <termref def="dt-must">may</termref> 
				be placed on the <code>xi:fallback</code> element.  Unprefixed 
				attribute names are reserved for future versions of this specification, 
				and <termref def="dt-must">must</termref> be ignored by XInclude 1.0 
				processors.</p>
				<p>The following (non-normative) DTD fragment illustrates a sample 
				declaration for the <code>xi:fallback</code> element:</p>
				<eg>&lt;!ELEMENT xi:fallback ANY&gt;
&lt;!ATTLIST xi:fallback
    xmlns:xi   CDATA   #FIXED   "&includensuri;"
&gt;</eg>
			</div2>
		</div1>
		<div1 id="processing">
			<head>Processing Model</head>
			<p>Inclusion as defined in this document is a specific type of 
			<bibref ref="XMLIS"/> transformation.</p>
			<p>
				<termdef id="dt-source-infoset" term="source infoset">The 
			input for the inclusion transformation consists of a <term>source 
			infoset</term>.</termdef>&#32;
			<termdef id="dt-result-infoset" term="result infoset">The output, called the <term>result 
			infoset</term>, is a new infoset which merges the source infoset 
			with the infosets of resources identified by URI references or IRI references 
			appearing in <code>xi:include</code> elements.</termdef>  Thus a 
			mechanism to resolve URIs or IRIs and return the identified resources as 
			infosets is assumed.  Well-formed XML entities that do not have 
			defined infosets (e.g. an external entity with multiple 
			top-level elements) are outside the scope of this specification, 
			either for use as a <termref def="dt-source-infoset">source 
			infoset</termref> or the <termref def="dt-result-infoset">result 
			infoset</termref>.</p>
			<p>
				<code>xi:include</code> elements in the source infoset serve
			as inclusion transformation instructions.
			<termdef id="dt-top-level-included-items" term="top-level included items">The 
			information items located by the <code>xi:include</code> element
			are called the <term>top-level included items</term>
				</termdef>.  
			<termdef id="dt-included-items" term="included items">The 
			<termref def="dt-top-level-included-items">top-level included items</termref>
			together with their attributes, namespaces, and descendants, 
			are called the <term>included items</term>
				</termdef>.  The 
			<termref def="dt-result-infoset">result infoset</termref> is 
			essentially a copy of the <termref def="dt-source-infoset">source 
			infoset</termref>, with each <code>xi:include</code> element
			and its descendants replaced by its corresponding
			<termref def="dt-included-items">included items</termref>.</p>
			<div2 id="include-location">
				<head>The Include Location</head>
				<p>The value of the <att>href</att> attribute, after escaping
				according to <specref ref="IRIs"/>, is interpreted as either a
				URI reference or an <termref def="dt-IRI">IRI reference</termref>.  
				The base URI for relative URIs or IRIs is the base URI of the <code>xi:include</code> 
				element as specified in <bibref ref="XMLBase"/>.  
				<termdef id="dt-include-location" term="include location">The 
				URI or IRI resulting from resolution of the normalized value of the 
				<code>href</code> attribute (or the empty string if no attribute appears) 
				to absolute URI or IRI form is called the <term>include location</term>.</termdef>
				</p>
				<p>The absence of a value for the <att>href</att> attribute, either 
				by the appearance of <att>href=""</att> or by the absence of the 
				<att>href</att> attribute, represents a case which may be incompatible 
				with certain implementation strategies.  For instance, an XInclude 
				processor might not have a textual representation of the 
				<termref def="dt-source-infoset">source infoset</termref> to include 
				as <att>parse="text"</att>, or it may be unable to access another 
				part of the document using <att>parse="xml"</att> and an xpointer 
				because of streamability concerns.  An implementation 
				<termref def="dt-must">may</termref> choose to treat any or all 
				absences of a value for the <att>href</att> attribute as 
				<termref def="dt-resource-error">resource errors</termref>.  
				Implementations <termref def="dt-must">should</termref> document 
				the conditions under which such <termref def="dt-resource-error">resource 
				errors</termref> occur.</p>
				<div3 id="IRIs">
					<head>Escaping of <att>href</att> attribute values</head>
					<p>The <att>href</att> attribute value is converted to either
					a URI reference or an IRI reference, as appropriate to the
					implementation.</p>
					<p>Work is currently in progress to produce an RFC defining
					Internationalized Resource Identifiers (IRIs).  Since this work is not
					yet complete, in this section we define IRI references syntactically.
					We expect to issue an erratum	replacing portions of this section with a 
					reference to the RFC when it is published. For a more general 
					definition and discussion of IRIs see 
					<bibref ref="IRIdraft"/> (work in progress).</p>
					<p>
						<termdef id="dt-IRI" term="IRI reference">
					An <term>IRI reference</term> is a string that can be converted to
					a URI reference by escaping the following additional characters:</termdef>
					</p>
					<ulist>
						<item>
							<p>the Unicode plane 0 characters #xA0 - #xD7FF, #xF900-#xFDCF, 
							#xFDF0-#xFFEF</p>
						</item>
						<item>
							<p>the Unicode plane 1-14 characters #x10000-#x1FFFD ... 
							#xE0000-#xEFFFD</p>
						</item>
					</ulist>
					<p>To convert the value of the <att>href</att> attribute to an IRI
					reference, the following characters <termref def="dt-must">must</termref> 
					be escaped:</p>
					<ulist>
						<item>
							<p>space #x20</p>
							<note>
								<p>Authors are advised to avoid unescaped spaces, as XML 
								Schema has <loc href="http://www.w3.org/TR/xmlschema-2/#anyURI-lexical-representation">	identified</loc> 
								them as an interoperability risk.</p>
							</note>
						</item>
						<item>
							<p>the delimiters <kw>&lt;</kw> #x3C, <kw>&gt;</kw> #x3E and 
							<kw>"</kw> #x22</p>
						</item>
						<item>
							<p>the unwise characters <kw>{</kw> #x7B, <kw>}</kw> #x7D, 
							<kw>|</kw> #x7C, <kw>\</kw> #x5C, <kw>^</kw> #x5E and 
							<kw>`</kw> #x60</p>
						</item>
					</ulist>
					<p>These characters are escaped as follows:</p>
					<olist>
						<item>
							<p>Each additional character is converted to UTF-8 
							<bibref ref="Unicode"/> as one or more bytes.</p>
						</item>
						<item>
							<p>The resulting bytes are escaped with the URI escaping 
							mechanism (that is, converted to %HH, where HH is the hexadecimal 
							notation of the byte value).</p>
						</item>
						<item>
							<p>The original character is replaced by the resulting character 
							sequence.</p>
						</item>
					</olist>
					<p>To convert an IRI reference to a URI reference, the additional characters
					allowed in IRIs <termref def="dt-must">must</termref> be escaped using the same
					method.</p>
				</div3>
				<div3 id="content-negotiation">
					<head>Using XInclude with Content Negotiation</head>
					<p>The use of a mechanism like HTTP <bibref ref="RFC2616"/> content
					negotiation introduces an additional level of potential complexity 
					into the use of XInclude. Developers who use XInclude in situations 
					where content negotiation is likely or possible should be aware of 
					the possibility that they will be including content that may differ 
					structurally from the content they expected, even if that content 
					is XML.  For example, a single URI or IRI may variously return a raw XML 
					representation of the resource, an XSL-FO <bibref ref="XSL-FO"/> 
					representation, or an XHTML <bibref ref="XHTML"/> representation, 
					as well as versions in different character encodings or languages.</p>
					<p>Authors whose XInclude processing depends on the receipt of 
					a particular vocabulary of XML should use the <att>accept</att>
					and <att>accept-language</att> attributes
					to increase the probability that the resource is provided in the
					expected format.</p>
				</div3>
			</div2>
			<div2 id="xml-included-items">
				<head>Included Items when <att>parse="xml"</att>
				</head>
				<p>When <att>parse="xml"</att>, the 
				<termref def="dt-include-location">include location</termref> is 
				dereferenced, the resource is fetched, and an infoset is created by 
				parsing the resource as if the media type were application/xml 
				(including character encoding determination).</p>
				<note>
					<p>The specifics of how an infoset is created are intentionally 
					unspecified, to allow for flexibility by implementations and to 
					avoid defining a particular processing model for components of 
					the XML architecture.  Particulars of whether DTD or XML schema 
					validation are performed, for example, are not constrained by 
					this specification.</p>
				</note>
				<note>
					<p>The character encodings of the including and included 
					resources can be different.  This does not affect the resulting 
					infoset, but might need to be taken into account during any 
					subsequent serialization.</p>
				</note>
				<p>Resources that are unavailable for any reason (for example the 
				resource doesn't exist, connection difficulties or security 
				restrictions prevent it from being fetched, the URI scheme isn't 
				a fetchable one, the resource is in an unsupported encoding, or the 
				resource is determined through implementation-specific mechanisms 
				not to be XML) 
				result in a <termref def="dt-resource-error">resource error</termref>. 
				Resources that contain non-well-formed XML result in a
				<termref def="dt-error">fatal error</termref>.</p>
				<note>
					<p>The distinction between a resource error and a fatal error 
					is somewhat implementation-dependent.  Consider an include 
					location returning an HTML document, perhaps as an error page.  
					One processor might determine that no infoset can be created 
					from the resource (by examining the media type, for example) 
					and raise a resource error, enabling fallback behavior.  
					Another processor with no such heuristics might attempt to 
					parse the non-XML resource as XML and encounter a 
					well-formedness (fatal) error.</p>
				</note>
				<p>
					<termdef id="dt-acquired-infoset" term="acquired infoset">
						<code>xi:include</code> elements in this infoset are recursively 
				processed to create the <term>acquired infoset</term>.
				For an intra-document reference (via <att>xpointer</att> attribute)
				the <termref def="dt-source-infoset">source	infoset</termref> is
				used as the acquired infoset.</termdef>
				</p>
				<p>
					<termdef id="dt-inclusion-target" term="inclusion target">The portion 
				of the <termref def="dt-acquired-infoset">acquired infoset</termref> to be 
				included is called the <term>inclusion target</term>.</termdef>  The 
				<emph role="info-item">document information item</emph> of the 
				<termref def="dt-acquired-infoset">acquired infoset</termref> serves 
				as the <termref def="dt-inclusion-target">inclusion target</termref> 
				unless the <att>xpointer</att> attribute is present and identifies a 
				subresource.  XPointers of the forms described in <bibref ref="XPCore"/> 
				and <bibref ref="XPElement"/>&#x20; <termref def="dt-must">must</termref> 
				be supported.  XInclude processors optionally support other forms of 
				XPointer such as that described in <bibref ref="XPointer"/>.  An error 
				in the XPointer is a <termref def="dt-resource-error">resource 
				error</termref>.</p>
				<p>The <bibref ref="XPointer"/> is not specified in terms of the 
				<bibref ref="XMLIS"/>, but instead is based on the 
				<bibref ref="XPath"/> Data Model, because the XML Information Set 
				had not yet been developed.  The mapping between XPath node 
				locations and information items is straightforward.  However, 
				xpointer() assumes that all entities have been expanded.  Thus 
				it is a <termref def="dt-error">fatal error</termref> to attempt 
				to resolve an xpointer() scheme on a document that contains 
				<emph role="info-item">unexpanded entity reference information 
				items</emph>.</p>
				<p>The set of <termref def="dt-top-level-included-items">top-level 
				included items</termref> is derived from the 
				<termref def="dt-acquired-infoset">acquired infoset</termref> as 
				follows.</p>
				<div3 id="docii">
					<head>Document Information Items</head>
					<p>The <termref def="dt-inclusion-target">inclusion target</termref> 
					might be a <emph role="info-item">document information item</emph> 
					(for instance, no specified <att>xpointer</att> attribute, or an 
					XPointer specifically locating the document root.)  In 	this case, 
					the set of <termref def="dt-top-level-included-items">top-level 
					included items</termref> is the <emph role="infoset-property">children</emph> 
					of the <termref def="dt-acquired-infoset">acquired infoset's</termref> 
					document information item, except for the 
					<emph role="info-item">document type declaration information item</emph> 
					child, if one exists.</p>
					<note>
						<p>The XML Information Set specification does not provide for 
						preservation of white space outside the document element.  
						XInclude makes no further provision to preserve this white 
						space.</p>
					</note>
				</div3>
				<div3 id="multiple-nodes">
					<head>Multiple Nodes</head>
					<p>The <termref def="dt-inclusion-target">inclusion target</termref> 
					might consist of more than a single node.  In this case the set of 
					<termref def="dt-top-level-included-items">top-level included 
					items</termref> is the set of information items from the 
					<termref def="dt-acquired-infoset">acquired infoset</termref> 
					corresponding to the nodes referred to by the XPointer, in the order 
					in which they appear in the acquired infoset.</p>
				</div3>
				<div3 id="ranges">
					<head>Range Locations</head>
					<p>The <termref def="dt-inclusion-target">inclusion target</termref> might 
					be a location set that represents a range or a set of ranges.</p>
					<p>Each range corresponds to a set of information items in the 
					<termref def="dt-acquired-infoset">acquired infoset</termref>. 
					<termdef term="selected" id="dt-selected">An information item is 
					said to be <term>selected</term> by a range if it occurs after 
					(in document order) the starting point of the range and before 
					the ending point of the range.</termdef>&#32;
					<termdef term="partially selected" id="dt-partially-selected">An 
					information item is said to be <term>partially selected</term> by 
					a range if it contains only the starting point of the range, or 
					only the ending point of the range.</termdef>  By definition, a 
					character information item cannot be 
					<termref def="dt-partially-selected">partially selected</termref>.</p>
					<p>The set of <termref def="dt-top-level-included-items">top-level 
					included  items</termref> is the union, in document order with 
					duplicates removed, of the information items either 
					<termref def="dt-selected">selected</termref> or 
					<termref def="dt-partially-selected">partially selected</termref> 
					by the range.  The <emph role="infoset-property">children</emph> 
					property of <termref def="dt-selected">selected</termref> 
					information items is not modified.  The 
					<emph role="infoset-property">children</emph> property of 
					<termref def="dt-partially-selected">partially selected</termref> 
					information items is the set of information items that are in 
					turn either <termref def="dt-selected">selected</termref> or
					<termref def="dt-partially-selected">partially selected</termref>,
					and so on.</p>
				</div3>
				<div3 id="points">
					<head>Point Locations</head>
					<p>The <termref def="dt-inclusion-target">inclusion target</termref> 
					might be a location set that represents a point.  In this case the 
					set of <termref def="dt-included-items">included items</termref> is 
					empty.</p>
				</div3>
				<div3 id="elements">
					<head>Element, Comment, and Processing Instruction Information Items</head>
					<p>The <termref def="dt-inclusion-target">inclusion target</termref> 
					might be an element node, a comment node, or a processing instruction 
					node, respectively representing an <emph role="info-item">element 
					information item</emph>, a <emph role="info-item">comment information 
					item</emph>, or a <emph role="info-item">processing instruction information 
					item</emph>.  In this case the set of 
					<termref def="dt-top-level-included-items">top-level included items</termref> 
					consists of the information item corresponding to the element, comment, or 
					processing instruction node in the <termref def="dt-acquired-infoset">acquired 
					infoset</termref>.</p>
				</div3>
				<div3 id="attributes">
					<head>Attribute and Namespace Declaration Information Items</head>
					<p>It is a <termref def="dt-error">fatal error</termref> for the 
					<termref def="dt-inclusion-target">inclusion target</termref> to be an 
					attribute node or a namespace node.</p>
				</div3>
				<div3 id="loops">
					<head>Inclusion Loops</head>
					<p>When recursively processing an <code>xi:include</code> 
					element, it is a <termref def="dt-error">fatal error</termref> to process 
					another <code>xi:include</code> element with an 
					<termref def="dt-include-location">include location</termref> and 
					<att>xpointer</att> attribute value that have already been processed in the 
					inclusion chain.</p>
					<p>In other words, the following are all legal:</p>
					<ulist>
						<item>
							<p>An <code>xi:include</code> element 
							<termref def="dt-must">may</termref> reference the document 
							containing the include element, when <att>parse="text"</att>.</p>
						</item>
						<item>
							<p>An <code>xi:include</code> element 
							<termref def="dt-must">may</termref> identify a different 
							part of the same local resource (same <att>href</att>,
							different <att>xpointer</att>).</p>
						</item>
						<item>
							<p>Two non-nested <code>xi:include</code> elements 
				          	<termref def="dt-must">may</termref> identify a resource which 
				          	itself contains an <code>xi:include</code> element.</p>
						</item>
					</ulist>
					<p>The following are illegal:</p>
					<ulist>
						<item>
							<p>An <code>xi:include</code> element pointing to itself or any 
							ancestor thereof, when <att>parse="xml"</att>.</p>
						</item>
						<item>
							<p>An <code>xi:include</code> element pointing to any include
							element or ancestor thereof which has already been processed 
							at a higher level.</p>
						</item>
					</ulist>
				</div3>
			</div2>
			<div2 id="text-included-items">
				<head>Included Items when <att>parse="text"</att>
				</head>
				<p>When <att>parse="text"</att>, the <termref def="dt-include-location">include 
				location</termref> is dereferenced and the resource is fetched 
				and transformed to a set of character information items.  This 
				feature facilitates the inclusion of working XML examples, as 
				well as other text-based formats.</p>
				<p>Resources that are unavailable for any reason (for example 
				the resource doesn't exist, connection difficulties or security 
				restrictions prevent it from being fetched, the URI scheme isn't 
				a fetchable one, or the resource is in an unsupported encoding) result in a 
				<termref def="dt-resource-error">resource error</termref>.</p>
				<p>The encoding of such a resource is determined by:</p>
				<ulist>
					<item>
						<p>external encoding information, if available, otherwise</p>
					</item>
					<item>
						<p>if the media type of the resource is <code>text/xml</code>,
						<code>application/xml</code>, or matches the conventions
						<code>text/*+xml</code> or <code>application/*+xml</code> as described
						in XML Media Types <bibref ref="RFC3023"/>, the encoding is
						recognized as specified in XML, otherwise</p>
					</item>
					<item>
						<p>the value of the <att>encoding</att> attribute if one
						exists, otherwise</p>
					</item>
					<item>
						<p>UTF-8.</p>
					</item>
				</ulist>
				<p>Byte sequences outside the range allowed by the encoding are a 
				<termref def="dt-error">fatal error</termref>.  Characters that are not 
				permitted in XML documents also are a
				<termref def="dt-error">fatal error</termref>.</p>
				<p>Each character obtained from the transformation of the resource is
				represented in the <termref def="dt-top-level-included-items">top-level 
				included items</termref> as a <emph role="info-item">character 
				information item</emph> with the 
				<emph role="infoset-property">character code</emph> set to the 
				character code in ISO 10646 encoding, and 
				the <emph role="infoset-property">element content whitespace</emph> set 
				to false.</p>
				<p>The <bibref ref="CharMod"/> discusses normalization of included text.</p>
			</div2>
			<div2 id="fallback">
				<head>Fallback Behavior</head>
				<p>XInclude processors <termref def="dt-must">must</termref> perform 
				fallback behavior in the event of a 
				<termref def="dt-resource-error">resource error</termref>, as follows:</p>
				<p>If the <emph role="infoset-property">children</emph> of the
				<code>xi:include</code> element information item in the 
				<termref def="dt-source-infoset">source infoset</termref> contain
				exactly one <code>xi:fallback</code> element, the
				<termref def="dt-top-level-included-items">top-level included items</termref> 
				consist of the information items corresponding to the result of performing 
				XInclude processing on the <emph role="infoset-property">children</emph> 
				of the <code>xi:fallback</code> element.  It is a 
				<termref def="dt-error">fatal error</termref> if there is zero or more than 
				one <code>xi:fallback</code> element.</p>
				<note>
					<p>Fallback content is not dependent on the value of the 
					<code>parse</code> attribute.  The <code>xi:fallback</code> 
					element can contain markup even when <code>parse="text"</code>.
					Likewise, it can contain a simple string when <code>parse="xml"</code>.</p>
				</note>
			</div2>
			<div2 id="creating-result">
				<head>Creating the Result Infoset</head>
				<p>The result infoset is a copy of the source infoset,
				with each <code>xi:include</code> element processed as follows:</p>
				<p>The information item for the <code>xi:include</code> element is 
				found. <termdef id="dt-include-parent" term="include parent">The
				<emph role="infoset-property">parent</emph> property of this item 
				refers to an information item called the <term>include parent</term>.</termdef>
				The <emph role="infoset-property">children</emph> property of the 
				<termref def="dt-include-parent">include parent</termref>
				is modified by replacing the <code>xi:include</code> element 
				information item with the <termref def="dt-top-level-included-items">top-level 
				included items</termref>. The <emph role="infoset-property">parent</emph> 
				property of each included item is set to the
				<termref def="dt-include-parent">include parent</termref>.</p>
				<p>It is a fatal error to attempt to replace an <code>xi:include</code> 
				element appearing as the document (top-level) element in the source 
				infoset with something other than a list of zero or more comments, 
				zero or more processing instructions, and one element.</p>
				<p>Some processors may not be able to represent an element's 
				<emph role="infoset-property">in-scope namespaces</emph> property if 
				it does not include bindings for all the prefixes bound in its 
				parent's <emph role="infoset-property">in-scope namespaces</emph>.  
				Such processors <termref def="dt-must">may</termref> therefore include 
				additional namespace bindings inherited from the 
				<termref def="dt-include-parent">include parent</termref> in the 
				<emph role="infoset-property">in-scope namespaces</emph> of
				the <termref def="dt-included-items">included items</termref>.</p>
				<p>The inclusion history of each <termref def="dt-top-level-included-items">top-level 
				included item</termref> is recorded in the extension property 
				<emph role="infoset-property">include history</emph>.  The 
				<emph role="infoset-property">include history</emph> property is 
				a list of <emph role="info-item">element information items</emph>, 
				representing the <code>xi:include</code> elements for recursive levels 
				of inclusion.  If an <emph role="infoset-property">include history</emph> 
				property already appears on a <termref def="dt-top-level-included-items">top-level 
				included item</termref>, the <code>xi:include</code> element information 
				item is prepended to the list.  If no <emph role="infoset-property">include 
				history</emph> property exists, then this property is added with the 
				single value of the <code>xi:include</code> element information item.</p>
				<p>The <termref def="dt-included-items">included items</termref> will all 
				appear in the result infoset.  This includes <emph role="info-item">unexpanded
				entity reference information items</emph> if they are present.</p>
				<p>Intra-document references within <code>xi:include</code> elements 
				are resolved against the source infoset.  The effect of this is that 
				the order in which <code>xi:include</code> elements are processed 
				does not affect the result.</p>
				<p>In the following example, the second include always points to 
				the first <code>xi:include</code> element and not to itself,
				regardless of the order in which the includes are processed.  Thus
				the result of this inclusion is two copies of <code>something.xml</code>,
				and does not produce an inclusion loop error.</p>
				<eg>&lt;x xmlns:xi="&includensuri;"&gt;
  &lt;xi:include href="something.xml"/&gt;
  &lt;xi:include xpointer="xmlns(xi=&includensuri;)xpointer(x/xi:include[1])"
              parse="xml"/&gt;
&lt;/x&gt;</eg>
				<div3 id="unparsed-entities">
					<head>Unparsed Entities</head>
					<p>Any <emph role="info-item">unparsed entity information 
					item</emph> appearing in the <emph role="infoset-property">references</emph> 
					property of an attribute on the <termref def="dt-included-items">included
					items</termref> or any descendant thereof is added to the 
					<emph role="infoset-property">unparsed entities</emph> 
					property of the <termref def="dt-result-infoset">result infoset</termref>'s
					<emph role="info-item">document information item</emph>, if 
					it is not a duplicate of an existing member.  Duplicates do not appear
					in the result infoset.</p>
					<p>Unparsed entity items with the same
					<emph role="infoset-property">name</emph>,
					<emph role="infoset-property">system identifier</emph>,
					<emph role="infoset-property">public identifier</emph>,
					<emph role="infoset-property">declaration base URI</emph>,
					<emph role="infoset-property">notation name</emph>, and
					<emph role="infoset-property">notation</emph> are
					considered to be duplicate.  An application 
					<termref def="dt-must">may</termref> also be able to detect that 
					unparsed entities are duplicate through other means.  For instance, 
					the URI resulting from combining the system identifier
					and the declaration base URI is the same.</p>
					<p>It is a <termref def="dt-error">fatal error</termref> to 
					include unparsed entity items with the same name, but which are not 
					determined to be duplicates.</p>
				</div3>
				<div3 id="notations">
					<head>Notations</head>
					<p>Any <emph role="info-item">notation information item</emph>
					appearing in the <emph role="infoset-property">references</emph> 
					property of an attribute in the <termref def="dt-included-items">included
					items</termref> or any descendant thereof is added to the 
					<emph role="infoset-property">notations</emph> property of the 
					<termref def="dt-result-infoset">result infoset</termref>'s
					<emph role="info-item">document information item</emph>, if 
					it is not a duplicate of an existing member.  Likewise,
					any notation referenced by an unparsed entity added as described
					in <specref ref="unparsed-entities"/>, is added unless it is
					a duplicate.  Duplicates do not appear in the result infoset.</p>
					<p>Notation items with the same
					<emph role="infoset-property">name</emph>,
					<emph role="infoset-property">system identifier</emph>,
					<emph role="infoset-property">public identifier</emph>, and
					<emph role="infoset-property">declaration base URI</emph> are
					considered to be duplicate.  An application <termref def="dt-must">may</termref>
					also be able to detect that notations are duplicate through other means.  For
					instance, the URI resulting from combining the system identifier
					and the declaration base URI is the same.</p>
					<p>It is a <termref def="dt-error">fatal error</termref> to 
					include notation items with the same name, but which are not 
					determined to be duplicates.</p>
				</div3>
				<div3 id="references-property">
					<head>
						<emph role="infoset-property">references</emph> Property Fixup</head>
					<p>During inclusion, an <emph role="info-item">attribute information 
					item</emph> whose <emph role="infoset-property">attribute type</emph> 
					property is IDREF or IDREFS has a <emph role="infoset-property">references</emph>
					property with zero or more element values from the source or included 
					infosets.  These values <termref def="dt-must">must</termref> be 
					adjusted to correspond to element values that occur in the result 
					infoset.  During this process, XInclude also corrects inconsistencies 
					between the <emph role="infoset-property">references</emph>
					property and the <emph role="infoset-property">attribute type</emph> 
					property, which might arise in the following circumstances:</p>
					<ulist>
						<item>
							<p>A document fragment contains an IDREF pointing to an element 
							in the included document but outside the part being included.  
							In this case there is no element in the result infoset that 
							corresponds to the element value in the original 
							<emph role="infoset-property">references</emph> property.</p>
						</item>
						<item>
							<p>A document or document fragment is not self-contained.  
							That is, it contains IDREFs which do not refer to an element within
							that document or document fragment, with the intention that these 
							references will be realized after inclusion.  In this case, 
							the value of the <emph role="infoset-property">references</emph> 
							property is unknown or has no value.</p>
						</item>
						<item>
							<p>The result infoset has ID clashes - that is, more than one
							attribute with <emph role="infoset-property">attribute type</emph>
							ID with the same <emph role="infoset-property">normalized value</emph>.
							In this case, attributes with <emph role="infoset-property">attribute 
							type</emph> IDREF or IDREFS with the same <emph role="infoset-property">
							normalized value</emph> might have different values for their
			         		<emph role="infoset-property">references</emph> properties.</p>
						</item>
					</ulist>
					<p>In resolving these inconsistencies, XInclude takes the 
					<emph role="infoset-property">attribute type</emph> property as 
					definitive.  In the result infoset, the value of the
					<emph role="infoset-property">references</emph> property of an
					<emph role="info-item">attribute information item</emph>
					whose <emph role="infoset-property">attribute type</emph> property
					is IDREF or IDREFS is adjusted as follows:</p>
					<p>For each token in the <emph role="infoset-property">normalized 
					value</emph> property, the <emph role="infoset-property">references</emph>
					property contains an <emph role="info-item">element information 
					item</emph> with the same properties as the 
					<emph role="info-item">element information item</emph> in the result
					infoset with an attribute with <emph role="infoset-property">attribute 
					type</emph> ID and <emph role="infoset-property">normalized
					value</emph> equal to the token.  The order of the elements in 
					the <emph role="infoset-property">references</emph> property is 
					the same as the order of the tokens appearing in the 
					<emph role="infoset-property">normalize value</emph>.  If for any of the
					token values, no element or more than one element is found, the 
					<emph role="infoset-property">references</emph> property has no value.</p>
				</div3>
				<div3 id="namespaces">
					<head>Namespace Fixup</head>
					<p>The <emph role="infoset-property">in-scope namespaces</emph> 
					property ensures that namespace scope is preserved through inclusion.  
					However, after inclusion, the <emph role="infoset-property">namespace
					attributes</emph> property might not provide the full list of 
					namespace declarations necessary to interpret qualified names in 
					attribute or element content in the result. It is therefore not 
					recommended that XInclude processors expose 
					<emph role="infoset-property">namespace attributes</emph> in the 
					result. If this is unavoidable, the implementation 
					<termref def="dt-must">may</termref> add 
					<emph role="info-item">attribute information items</emph> to the
					<emph role="infoset-property">namespace attributes</emph> property 
					in order to approximate the information conveyed by 
					<emph role="infoset-property">in-scope namespaces</emph>.</p>
				</div3>
				<div3 id="base">
					<head>Base URI Fixup</head>
					<p>The base URI property of the acquired infoset is not changed as 
					a result of merging the infoset, and remains unchanged after merging.
					Thus relative URI references in the included infoset resolve to the same
					URI despite being included into a document with a potentially
					different base URI in effect.  <att>xml:base</att> attributes are added
					to the result infoset to indicate this fact.</p>
					<p>Each <emph role="info-item">element information item</emph> in 
					the <termref def="dt-top-level-included-items">top-level included 
					items</termref> which has a different <emph role="infoset-property">base 
					URI</emph> than its <termref def="dt-include-parent">include parent</termref> 
					has an <emph role="info-item">attribute information item</emph> added to its
					<emph role="infoset-property">attributes</emph> property.  This attribute has the following properties:</p>
					<olist>
						<item>
							<p>A <emph role="infoset-property">namespace name</emph> of 
							<code>http://www.w3.org/XML/1998/namespace</code>.</p>
						</item>
						<item>
							<p>A <emph role="infoset-property">local name</emph> of 
							<code>base</code>.</p>
						</item>
						<item>
							<p>A <emph role="infoset-property">prefix</emph> of 
							<code>xml</code>.</p>
						</item>
						<item>
							<p>A <emph role="infoset-property">normalized value</emph> 
							equal to either the <emph role="infoset-property">base 
							URI</emph> of the element, or an equivalent URI reference 
							relative to the <emph role="infoset-property">base URI</emph> 
							of the include parent.  The circumstances in which a relative 
							URI is desirable, and how to compute such a relative URI, 
							are implementation-dependent.</p>
						</item>
						<item>
							<p>A <emph role="infoset-property">specified</emph> flag 
							indicating that this attribute was actually specified in the 
							start-tag of its element.</p>
						</item>
						<item>
							<p>An <emph role="infoset-property">attribute type</emph> of 
							<code>CDATA</code>.</p>
						</item>
						<item>
							<p>A <emph role="infoset-property">references</emph> property 
							with no value.</p>
						</item>
						<item>
							<p>An <emph role="infoset-property">owner element</emph> of the 
							information item of the element.</p>
						</item>
					</olist>
					<p>If an <att>xml:base</att> attribute information item is already 
					present, it is replaced by the new attribute.</p>
				</div3>
				<div3 id="language">
					<head>Language Fixup</head>
					<p>While the <code>xml:lang</code> attribute is described as inherited 
					by XML, the XML Information Set makes no provision for preserving the 
					inheritance of this property through document composition such as XInclude 
					provides.  This section introduces a <emph role="infoset-property">language</emph> 
					property which records the scope of <code>xml:lang</code> information in 
					order to preserve it during inclusion.</p>
					<p>An XInclude processor <termref def="dt-must">should</termref> augment 
					the <termref def="dt-source-infoset">source infoset</termref> and the 
					<termref def="dt-acquired-infoset">acquired infoset</termref> by adding 
					the <emph role="infoset-property">language</emph> property to each 
					<emph role="info-item">element information item</emph>.  The value of 
					this property is the <emph role="infoset-property">normalized value</emph> 
					of the <code>xml:lang</code> attribute appearing on that element if one 
					exists, with <att>xml:lang=""</att> resulting in no value, otherwise it 
					is the value of the <emph role="infoset-property">language</emph> property 
					of the element's parent element if one exists, otherwise the property 
					has no value.</p>
					<p>Each <emph role="info-item">element information item</emph> in the 
					<termref def="dt-top-level-included-items">top-level included items</termref> 
					which has a different value of <emph role="infoset-property">language</emph> 
					than its <termref def="dt-include-parent">include parent</termref> (taking 
					case-insensitivity into account per <bibref ref="RFC3066"/>), or that has 
					a value if its <termref def="dt-include-parent">include parent</termref> is 
					a <emph role="info-item">document information item</emph>, has an 
					<emph role="info-item">attribute information item</emph> added to its 
					<emph role="infoset-property">attributes</emph> property.  This attribute 
					has the following properties:</p>
					<olist>
						<item>
							<p>A <emph role="infoset-property">namespace name</emph> of 
							<code>http://www.w3.org/XML/1998/namespace</code>.</p>
						</item>
						<item>
							<p>A <emph role="infoset-property">local name</emph> of 
							<code>lang</code>.</p>
						</item>
						<item>
							<p>A <emph role="infoset-property">prefix</emph> of <code>xml</code>.</p>
						</item>
						<item>
							<p>A <emph role="infoset-property">normalized value</emph> equal to 
							the <emph role="infoset-property">language</emph> property of the 
							element.  If the <emph role="infoset-property">language</emph> property 
							has no value, the normalized value is the empty string.</p>
						</item>
						<item>
							<p>A <emph role="infoset-property">specified</emph> flag indicating 
							that this attribute was actually specified in the start-tag of its 
							element.</p>
						</item>
						<item>
							<p>An <emph role="infoset-property">attribute type</emph> of 
							<code>CDATA</code>.</p>
						</item>
						<item>
							<p>A <emph role="infoset-property">references</emph> property with 
							no value.</p>
						</item>
						<item>
							<p>An <emph role="infoset-property">owner element</emph> of the 
							information item of the element.</p>
						</item>
					</olist>
					<p>If an <att>xml:lang</att> attribute information item is already present, 
					it is replaced by the new attribute.</p>
					<note>
						<p>The <code>xml:space</code> attribute is not treated specially by 
						XInclude.</p>
					</note>
				</div3>
				<div3 id="properties">
					<head>Properties Preserved by the Infoset</head>
					<p>As an infoset transformation, XInclude operates on the logical 
					structure of XML documents, not on their text serialization.  All 
					properties of an information item described in <bibref ref="XMLIS"/> 
					other than those specifically modified by this specification are 
					preserved during inclusion.  The <emph role="infoset-property">include history</emph>
					and <emph role="infoset-property">language</emph>
					properties introduced in this specification is also preserved.
					Extension properties such as 
					<bibref ref="XMLSchemas"/> Post Schema Validation Infoset (PSVI) 
					properties are discarded by default.  However, an XInclude 
					processor <termref def="dt-must">may</termref>, at user option, 
					preserve these properties in the resulting infoset if they 
					are correct according to the specification describing the 
					semantics of the extension properties.</p>
					<p>For instance, the PSVI <emph role="infoset-property">validity</emph>
					property describes the conditions of ancestors and descendants.  
					Modification of ancestors and descendants during the XInclude 
					process can render the value of this property inaccurate.  By 
					default, XInclude strips this property, but by user option the 
					property could be recalculated to obtain a semantically accurate 
					value.  Precisely how this is accomplished is outside the scope 
					of this specification.</p>
				</div3>
			</div2>
		</div1>
		<div1 id="conformance">
			<head>Conformance</head>
			<div2 id="markup">
				<head>Markup Conformance</head>
				<p>An <emph role="info-item">element information item</emph> conforms
				to this specification if it meets the structural requirements for 
				include elements defined in this specification.  This specification
				imposes no particular constraints on DTDs or XML schemas; conformance 
				applies only to elements and attributes.</p>
			</div2>
			<div2 id="application">
				<head>Application Conformance</head>
				<p>An application conforms to XInclude if it:</p>
				<ulist>
					<item>
						<p>supports <bibref ref="XML"/> and <bibref ref="XMLNS"/> 
						or <bibref ref="XML11"/> and <bibref ref="XMLNS11"/>, 
						the <bibref ref="XMLIS"/>, <bibref ref="XMLBase"/>, the 
						<bibref ref="XPCore"/>, and the <bibref ref="XPElement"/>;</p>
					</item>
					<item>
						<p>stops processing when a <termref def="dt-error">fatal 
						error</termref> is encountered;</p>
					</item>
					<item>
						<p>observes the mandatory conditions 
						(<termref def="dt-must">must</termref>) set forth in this 
						specification, and for any optional conditions
						(<termref def="dt-must">should</termref> and 
						<termref def="dt-must">may</termref>) it chooses to observe, 
						observes them in the way prescribed; and</p>
					</item>
					<item>
						<p>performs markup conformance testing according to all the
						conformance constraints appearing in this specification.</p>
					</item>
				</ulist>
				<p>Support for the <bibref ref="XPointer"/> is not mandatory for 
				full XInclude conformance.  Authors are advised that use of 
				xpointer() and other XPointer schemes than element() might not be 
				supported by all conformant XInclude implementations.</p>
			</div2>
			<div2 id="infoset">
				<head>XML Information Set Conformance</head>
				<p>This specification conforms to the <bibref ref="XMLIS"/>.
				The following information items <termref def="dt-must">must</termref> 
				be present in the input infosets to enable correct processing:</p>
				<ulist>
					<item>
						<p>
							<emph role="info-item">Document information items</emph> with
						<emph role="infoset-property">children</emph> and
						<emph role="infoset-property">base URI</emph> properties.</p>
					</item>
					<item>
						<p>
							<emph role="info-item">Element information items</emph> with
						<emph role="infoset-property">namespace name</emph>,
						<emph role="infoset-property">local name</emph>,
						<emph role="infoset-property">children</emph>,
						<emph role="infoset-property">attributes</emph>,
						<emph role="infoset-property">base URI</emph> and
						<emph role="infoset-property">parent</emph> properties.</p>
					</item>
					<item>
						<p>
							<emph role="info-item">Attribute information items</emph> with
						<emph role="infoset-property">namespace name</emph>,
						<emph role="infoset-property">local name</emph> and
						<emph role="infoset-property">normalized value</emph> properties.</p>
					</item>
				</ulist>
				<p>Additionally, XInclude processing might generate the following 
				kinds of information items in the result:</p>
				<ulist>
					<item>
						<p>
							<emph role="info-item">Character information items</emph> with
			            <emph role="infoset-property">character code</emph>,
			            <emph role="infoset-property">element content whitespace</emph> and
			            <emph role="infoset-property">parent</emph> properties.</p>
					</item>
				</ulist>
				<p>XInclude extends the infoset with the property
				<emph role="infoset-property">include history</emph>, which 
				<termref def="dt-must">may</termref> appear on the following
				types of information items in the result:</p>
				<ulist>
					<item>
						<p>
							<emph role="info-item">Element information items</emph>.</p>
					</item>
					<item>
						<p>
							<emph role="info-item">Processing instruction information items</emph>.</p>
					</item>
					<item>
						<p>
							<emph role="info-item">Comment information items</emph>.</p>
					</item>
					<item>
						<p>
							<emph role="info-item">Character information items</emph>.</p>
					</item>
				</ulist>
				<p>XInclude also extends the infoset with the property 
				<emph role="infoset-property">language</emph>, which 
				<termref def="dt-must">may</termref> appear on 
				<emph role="info-item">element information items</emph> 
				in the result.</p>
			</div2>
		</div1>
	</body>
	<back>
		<div1 id="references">
			<head>References</head>
			<blist>
				<bibl id="RFC2119" key="IETF RFC 2119" href="http://www.ietf.org/rfc/rfc2119.txt">
					<titleref href="http://www.ietf.org/rfc/rfc2119.txt">RFC 2119: Key 
				words for use in RFCs to Indicate Requirement Levels</titleref>.
				Internet Engineering Task Force, 1997.</bibl>
				<bibl id="RFC2279" key="IETF RFC 2279" href="http://www.ietf.org/rfc/rfc2279.txt">
					<titleref href="http://www.ietf.org/rfc/rfc2279.txt">RFC 2279: UTF-8, 
				a transformation format of ISO 10646</titleref>.
				Internet Engineering Task Force, 1998.</bibl>
				<bibl id="RFC2396" key="IETF RFC 2396" href="http://www.ietf.org/rfc/rfc2396.txt">
					<titleref href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396: 
				Uniform Resource Identifiers</titleref>. Internet Engineering 
				Task Force, 1995.</bibl>
				<bibl id="RFC2732" key="IETF RFC 2732" href="http://www.ietf.org/rfc/rfc2732.txt">
					<titleref href="http://www.ietf.org/rfc/rfc2732.txt">RFC 2732: 
				Format for Literal IPv6 Addresses in URL's</titleref>.
				Internet Engineering Task Force, 1999.</bibl>
				<bibl id="RFC3023" key="IETF RFC 3023" href="http://www.ietf.org/rfc/rfc3023.txt">
					<titleref href="http://www.ietf.org/rfc/rfc3023.txt">RFC 3023: 
				XML Media Types</titleref>.
				Internet Engineering Task Force, 2001.</bibl>
				<bibl id="Unicode" key="Unicode">The Unicode Consortium. 
				<titleref href="http://www.unicode.org/unicode/standard/versions/">The 
				Unicode Standard, Version 4.0.</titleref> Reading, Mass.: Addison-Wesley,
				2003, as updated from time to time by the publication of new versions. (See
				<loc href="http://www.unicode.org/unicode/standard/versions/">
				http://www.unicode.org/unicode/standard/versions/</loc> for the latest version
				and additional information on versions of the standard and of the Unicode
				Character Database).</bibl>
				<bibl id="XML" key="XML 1.0" href="http://www.w3.org/TR/2004/REC-xml-20040204/">
				Tim Bray, Jean Paoli, C.M. Sperberg-McQueen, Eve Maler, Fran&#xE7;ois Yergeau, editors.
				<titleref href="http://www.w3.org/TR/2004/REC-xml-20040204/">Extensible Markup 
				Language (XML) 1.0 (Third Edition)</titleref>, 
				World Wide Web Consortium, 2004.</bibl>
				<bibl id="XML11" key="XML 1.1" href="http://www.w3.org/TR/2004/REC-xml11-20040204/">
				Tim Bray, Jean Paoli, C.M. Sperberg-McQueen, Eve Maler, Fran&#xE7;ois Yergeau, 
				John Cowan, editors.
				<titleref href="http://www.w3.org/TR/2004/REC-xml11-20040204/">Extensible Markup 
				Language (XML) 1.1</titleref>, 
				World Wide Web Consortium, 2004.</bibl>
				<bibl id="XMLBase" key="XML Base" href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">
				Jonathan Marsh, editor.
				<titleref href="http://www.w3.org/TR/2001/REC-xmlbase-20010627/">XML Base</titleref>.
				World Wide Web Consortium, 2001.</bibl>
				<bibl id="XMLIS" key="XML Information Set" href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/">
				John Cowan and Richard Tobin, editors.
				<titleref href="http://www.w3.org/TR/2004/REC-xml-infoset-20040204/">XML Information 
				Set (Second Edition)</titleref>. World Wide Web Consortium, 2004.</bibl>
				<bibl id="XMLNS" key="Namespaces in XML" href="http://www.w3.org/TR/1999/REC-xml-names-19990114/">
				Tim Bray, Dave Hollander, and Andrew Layman, editors.
				<titleref href="http://www.w3.org/TR/1999/REC-xml-names-19990114/">Namespaces in XML</titleref>.
				World Wide Web Consortium, 1999.</bibl>
				<bibl id="XMLNS11" key="Namespaces in XML 1.1" href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/">Tim Bray, Dave Hollander, Andrew Layman, Richard Tobin, editors.
				<titleref href="http://www.w3.org/TR/2004/REC-xml-names11-20040204/">Namespaces in XML 1.1</titleref>.
				World Wide Web Consortium, 2004.</bibl>
				<bibl id="XPCore" key="XPointer Framework" href="http://www.w3.org/TR/2003/REC-xptr-framework-20030325/">
				Paul Grosso, Eve Maler, Jonathan Marsh, Norman Walsh, editors.
				<titleref href="http://www.w3.org/TR/2003/REC-xptr-framework-20030325/">XPointer Framework</titleref>.
				World Wide Web Consortium, 2003.</bibl>
				<bibl id="XPElement" key="XPointer element() scheme" href="http://www.w3.org/TR/2003/REC-xptr-element-20030325/">
				Paul Grosso, Eve Maler, Jonathan Marsh, Norman Walsh, editors.
				<titleref href="http://www.w3.org/TR/2003/REC-xptr-element-20030325/">XPointer element() 
				Scheme</titleref>.
				World Wide Web Consortium, 2003.</bibl>
			</blist>
		</div1>
		<inform-div1>
			<head>References</head>
			<blist>
				<bibl id="RFC2616" key="IETF RFC 2616" href="http://www.ietf.org/rfc/rfc2616.txt">
					<titleref href="http://www.ietf.org/rfc/rfc2616.txt">RFC 2616: 
				Hypertext Transfer Protocol -- HTTP/1.1</titleref>.
				Internet Engineering Task Force, 1999.</bibl>
				<bibl id="RFC3066" key="IETF RFC 3066" href="http://www.ietf.org/rfc/rfc3066.txt">
					<titleref href="http://www.ietf.org/rfc/rfc3066.txt">RFC 3066: 
				Tags for the Identification of Languages</titleref>.
				Internet Engineering Task Force, 2001.</bibl>
				<bibl id="XInclude-note" key="XML Inclusion Proposal" href="http://www.w3.org/TR/1999/NOTE-xinclude-19991123">
				Jonathan Marsh, David Orchard, editors. 
				<titleref href="http://www.w3.org/TR/1999/NOTE-xinclude-19991123">XML 
				Inclusion Proposal (XInclude).</titleref>
				World Wide Web Consortium, 2004.</bibl>
				<bibl id="XLink" key="XML Linking Language" href="http://www.w3.org/TR/2001/REC-xlink-20010627/">
				Steve DeRose, Eve Maler, David Orchard, and Ben Trafford, editors. 
				<titleref href="http://www.w3.org/TR/2001/REC-xlink-20010627/">XML Linking Language (XLink).</titleref>
				World Wide Web Consortium, 2001.</bibl>
				<bibl id="XPointer" key="XPointer xpointer() Scheme" href="http://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/">
				Steve DeRose, Ron Daniel, Eve Maler, editors.
				<titleref href="http://www.w3.org/TR/2002/WD-xptr-xpointer-20021219/">XPointer 
				xpointer() Scheme</titleref>.
				World Wide Web Consortium, 2002.</bibl>
				<bibl id="XPath" key="XPath 1.0" href="http://www.w3.org/TR/1999/REC-xpath-19991116">
				James Clark, Steve DeRose, editors.
				<titleref href="http://www.w3.org/TR/1999/REC-xpath-19991116">XML Path Language (XPath) 
				Version 1.0.</titleref>
				World Wide Web Consortium, 1999.</bibl>
				<bibl id="IRIdraft" key="IRI draft" href="http://www.ietf.org/internet-drafts/draft-duerst-iri-10.txt">
					<titleref href="http://www.ietf.org/internet-drafts/draft-duerst-iri-10.txt">Internationalized 
				Resource Identifiers (IRIs)</titleref>.</bibl>
				<bibl id="CharMod" key="Character Model" href="http://www.w3.org/TR/charmod-norm/">
				Martin J. D&#xFC;rst, Fran&#xE7;ois Yergeau, Misha Wolf, Asmus Freytag, Tex Texin.
				<titleref href="http://www.w3.org/TR/charmod-norm/">Character Model for the 
				World Wide Web 1.0: Normalization</titleref>.
				World Wide Web Consortium, 2001.</bibl>
				<bibl id="XMLSchemas" key="XML Schemas" href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">
				Henry S. Thompson, David Beech, Murray Maloney, Noah Mendelsohn, editors.
				<titleref href="http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/">XML Schema Part 1: 
				Structures.</titleref>
				World Wide Web Consortium, 2001.</bibl>
				<bibl id="XSL-FO" key="XSL-FO" href="http://www.w3.org/TR/2001/REC-xsl-20011015/">
				Sharon Adler <emph>et al</emph>.
				<titleref href="http://www.w3.org/TR/2001/REC-xsl-20011015/">Extensible Stylesheet 
				Language (XSL)</titleref>.
				World Wide Web Consortium, 2001.</bibl>
				<bibl id="XHTML" key="XHTML" href="http://www.w3.org/TR/2002/REC-xhtml1-20020801/">
				Steven Pemberton <emph>et al</emph>.
				<titleref href="http://www.w3.org/TR/2002/REC-xhtml1-20020801/">XHTML 1.0 The Extensible 
				HyperText Markup Language (Second Edition)</titleref>.
				World Wide Web Consortium, 2002.</bibl>
			</blist>
		</inform-div1>
		<inform-div1 id="examples">
			<head>Examples</head>
			<div2 id="basic-example">
				<head>Basic Inclusion Example</head>
				<p>The following XML document contains an <code>xi:include</code> element 
				which points to an external document.  Assume the base URI of this document is
				<code>http://www.example.org/document.xml</code>.</p>
				<eg><![CDATA[<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>120 Mz is adequate for an average home user.</p>
  <xi:include href="disclaimer.xml"/>
</document>]]></eg>
				<p>disclaimer.xml contains:</p>
				<eg><![CDATA[<?xml version='1.0'?>
<disclaimer>
  <p>The opinions represented herein represent those of the individual
  and should not be interpreted as official policy endorsed by this
  organization.</p>
</disclaimer>]]></eg>
				<p>The infoset resulting from resolving inclusions on this document
				is the same (except for the <emph role="infoset-property">include history</emph>
				and <emph role="infoset-property">language</emph> properties)
				as that of the following document:</p>
				<eg><![CDATA[<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>120 Mz is adequate for an average home user.</p>
  <disclaimer xml:base="http://www.example.org/disclaimer.xml">
  <p>The opinions represented herein represent those of the individual
  and should not be interpreted as official policy endorsed by this
  organization.</p>
</disclaimer>
</document>]]></eg>
			</div2>
			<div2 id="text-example">
				<head>Textual Inclusion Example</head>
				<p>The following XML document includes a "working example" into
				a document.</p>
				<eg><![CDATA[<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>This document has been accessed
  <xi:include href="count.txt" parse="text"/> times.</p>
</document>]]></eg>
				<p>where count.txt contains:</p>
				<eg><![CDATA[324387]]></eg>
				<p>The infoset resulting from resolving inclusions on this document
				is the same (except for the <emph role="infoset-property">include history</emph>
				and <emph role="infoset-property">language</emph> properties)
				as that of the following document:</p>
				<eg><![CDATA[<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>This document has been accessed
  324387 times.</p>
</document>]]></eg>
			</div2>
			<div2 id="xml-as-text-example">
				<head>Textual Inclusion of XML Example</head>
				<p>The following XML document includes a "working example" into
				a document.</p>
				<eg><![CDATA[<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>The following is the source of the "data.xml" resource:</p>
  <example><xi:include href="data.xml" parse="text"/></example>
</document>]]></eg>
				<p>data.xml contains:</p>
				<eg><![CDATA[<?xml version='1.0'?>
<data>
  <item><![CDATA[Brooks & Shields]]]]><![CDATA[></item>
</data>]]></eg>
				<p>The infoset resulting from resolving inclusions on this document
				is the same (except for the <emph role="infoset-property">include history</emph>
				and <emph role="infoset-property">language</emph> properties)
				as that of the following document:</p>
				<eg><![CDATA[<?xml version='1.0'?>
<document xmlns:xi="http://www.w3.org/2001/XInclude">
  <p>The following is the source of the "data.xml" resource:</p>
  <example>&lt;?xml version='1.0'?&gt;
&lt;data&gt;
  &lt;item&gt;&lt;![CDATA[Brooks &amp; Shields]]&gt;&lt;/item&gt;
&lt;/data&gt;</example>
</document>]]></eg>
			</div2>
			<div2 id="fragment-example">
				<head>Fragment Inclusion Example</head>
				<p>The following illustrates the results of including fragments of 
				another XML document.  Assume the base URI of the document is 
				<code>http://www.example.com/JoeSmithQuote.xml</code>.</p>
				<eg><![CDATA[<?xml version='1.0'?>
<price-quote xmlns:xi="http://www.w3.org/2001/XInclude">
  <prepared-for>Joe Smith</prepared-for>
  <good-through>20040930</good-through>
  <xi:include href="price-list.xml" xpointer="w002-description"/>
  <volume>40</volume>
  <xi:include href="price-list.xml" xpointer="element(w002-prices/2)"/>
</price-quote>]]></eg>
				<p>price-list.xml references a DTD which declares the <att>id</att> 
				attributes as type <code>ID</code>, and contains:</p>
				<eg><![CDATA[<?xml version='1.0'?>
<!DOCTYPE price-list SYSTEM "price-list.dtd">
<price-list xml:lang="en-us">
  <item id="w001">
    <description id="w001-description">
      <p>Normal Widget</p>
    </description>
    <prices id="w001-prices">
      <price currency="USD" volume="1+">39.95</price>
      <price currency="USD" volume="10+">34.95</price>
      <price currency="USD" volume="100+">29.95</price>
    </prices>
  </item>
  <item id="w002">
    <description id="w002-description">
      <p>Super-sized widget with bells <i>and</i> whistles.</p>
    </description>
    <prices id="w002-prices">
      <price currency="USD" volume="1+">59.95</price>
      <price currency="USD" volume="10+">54.95</price>
      <price currency="USD" volume="100+">49.95</price>
    </prices>
  </item>
</price-list>]]></eg>
				<p>The infoset resulting from resolving inclusions on this document
				is the same (except for the <emph role="infoset-property">include history</emph>
				and <emph role="infoset-property">language</emph> properties)
				as that of the following document:</p>
				<eg><![CDATA[<?xml version='1.0'?>
<price-quote xmlns:xi="http://www.w3.org/2001/XInclude">
  <prepared-for>Joe Smith</prepared-for>
  <good-through>20040930</good-through>
  <description id="w002-description" xml:lang="en-us"
               xml:base="http://www.example.com/price-list.xml">
    <p>Super-sized widget with bells <i>and</i> whistles.</p>
  </description>
  <volume>40</volume>
  <price currency="USD" volume="10+" xml:lang="en-us"
         xml:base="http://www.example.com/price-list.xml">45.95</price>
</price-quote>]]></eg>
			</div2>
			<div2 id="range-example">
				<head>Range Inclusion Example</head>
				<p>The following illustrates the results of including a range
				specified by an XPointer.  Assume the base URI of the document
				is <code>http://www.example.com/document.xml</code>.</p>
				<eg><![CDATA[<?xml version='1.0'?>
<document>
  <p>The relevant excerpt is:</p>
  <quotation>
    <include xmlns="http://www.w3.org/2001/XInclude"
       href="source.xml" xpointer="xpointer(string-range(chapter/p[1],'Sentence 2')/
             range-to(string-range(/chapter/p[2]/i,'3.',1,2)))"/>
  </quotation>
</document>]]></eg>
				<p>source.xml contains:</p>
				<eg><![CDATA[<chapter>
  <p>Sentence 1.  Sentence 2.</p>
  <p><i>Sentence 3.  Sentence 4.</i>  Sentence 5.</p>
</chapter>]]></eg>
				<p>The infoset resulting from resolving inclusions on this document
				is the same (except for the <emph role="infoset-property">include history</emph>
				and <emph role="infoset-property">language</emph> properties)
				as that of the following document:</p>
				<eg><![CDATA[<?xml version='1.0'?>
<document>
  <p>The relevant excerpt is:</p>
  <quotation>
    <p xml:base="http://www.example.com/source.xml">Sentence 2.</p>
  <p xml:base="http://www.example.com/source.xml"><i>Sentence 3.</i></p>
  </quotation>
</document>]]></eg>
			</div2>
			<div2 id="fallback-example">
				<head>Fallback Example</head>
				<p>The following XML document relies on the fallback mechanism to
				succeed in the event that the resources <code>example.txt</code> and
				<code>fallback-example.txt</code> are not available..</p>
				<eg><![CDATA[<?xml version='1.0'?>
<div>
  <xi:include href="example.txt" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:fallback><xi:include href="fallback-example.txt" parse="text">
        <xi:fallback><a href="mailto:bob@example.org">Report error</a></xi:fallback>
      </xi:include></xi:fallback>
  </xi:include>
</div>]]></eg>
				<p>If neither <code>example.txt</code> nor <code>fallback-example.txt</code>
				are available, the infoset resulting from resolving inclusions on this document
				is the same (except for the <emph role="infoset-property">include history</emph>
				and <emph role="infoset-property">language</emph> properties)
				as that of the following document:</p>
				<eg><![CDATA[<?xml version='1.0'?>
<div>
  <a href="mailto:bob@example.org">Report error</a>
</div>]]></eg>
			</div2>
		</inform-div1>
	</back>
</spec>
