<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type="text/xsl" href="../../../2002/xmlspec/xhtml/1.13/diffspec.xsl"?>
<!DOCTYPE spec SYSTEM "../../../2002/xmlspec/dtd/2.10/xmlspec.dtd" >
<spec w3c-doctype="wgnote">
 <header>
  <title>XML processor profiles</title>
  <w3c-designation>NOTE-xml-proc-profiles-20140206</w3c-designation>
  <w3c-doctype>W3C Working Group Note</w3c-doctype>
  <pubdate>
   <day>06</day>
   <month>February</month>
   <year>2014</year>
   <!-- $Id: xml-proc-profiles.xml,v 1.79 2014/02/05 21:02:58 NormanWalsh Exp $-->
  </pubdate>
  <publoc>
    <loc href="http://www.w3.org/TR/2014/NOTE-xml-proc-profiles-20140206/"/>
  </publoc>
  <altlocs>
    <loc href="xml-proc-profiles.xml">XML</loc>
  </altlocs>
  <latestloc>
   <loc href="http://www.w3.org/TR/xml-proc-profiles/"/>
  </latestloc>
<prevlocs>
 <loc href="http://www.w3.org/TR/2012/WD-xml-proc-profiles-20120124/"/>
</prevlocs>
  <authlist>
   <author>
    <name>Henry S. Thompson</name>
    <affiliation>University of Edinburgh</affiliation>
    <email href="mailto:ht@inf.ed.ac.uk">ht@inf.ed.ac.uk</email>
   </author>
   <author>
    <name>Norman Walsh</name>
    <affiliation>MarkLogic Corporation</affiliation>
    <email href="mailto:norman.walsh@marklogic.com">norman.walsh@marklogic.com</email>
   </author>
   <author>
    <name>James Fuller</name>
    <affiliation>Webcomposite S.R.O</affiliation>
    <email href="mailto:jim.fuller@webcomposite.com">jim.fuller@webcomposite.com</email>
   </author>
  </authlist>
      <abstract>
       <p>This specification defines several XML processor
profiles, each of which defines how any given XML
document should be processed, both operationally and in
terms of what information must be made available to applications.  It is intended as a resource for other specifications, which can by
a single normative reference establish precisely what input processing they
require as well as what information they require.</p>
      </abstract>

<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 Note describes several possible profiles of XML that might be
useful to authors of other specifications. It also attempts to classify
some axes along which profiles might occur.
This document
is a product of the
<loc href="http://www.w3.org/XML/Processing/">XML Processing Model
Working Group</loc> which is part of the W3C
<loc href="http://www.w3.org/XML/Activity">XML Activity</loc>.
Comments on this document should be sent to the
public mailing list
<loc href="mailto:public-xml-processing-model-comments@w3.org">public-xml-processing-model-comments@w3.org</loc> (public
<loc href="http://lists.w3.org/Archives/Public/public-xml-processing-model-comments/">archives</loc> are available).</p>

<p>Earlier efforts by this working group focused on making this a
Recommendation track document. In the intervening years, some of this
work has been overtaken by events. Many of the sorts of XML languages
that might have found value in the profiles described herein would
today be more likely expressed in JSON or some other format.
</p>

<p>One impetus for this document was to publish a normative
description of <emph>the XML processing model</emph>. Experience
suggests that the profiles in this document are simultaneously too
numerous and not numerous enough.
It is clear that
XML has more than one processing model, but it is not clear that
there is community consensus on what those models are or even by
what axes they should be classified.</p>

<p>Though the Working Group has decided not to continue this document
on the Recommendation track, we have decided to publish it as a Note
in the hopes that the classifications it does provide may prove
useful.</p>

<p>Publication as a Working Group Note 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>This document was produced by a group operating under the <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
February 2004 W3C Patent Policy</loc>. W3C maintains a <loc href="http://www.w3.org/2004/01/pp-impl/38398/status">public
list of any patent disclosures</loc> made in connection with the
deliverables of the group; that page also includes instructions for
disclosing a patent. An individual who has actual knowledge of a
patent which the individual believes contains <loc href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
Claim(s)</loc> must 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>.</p>
</status>
      <langusage>
         <language id="en">English</language>
      </langusage>
      <revisiondesc>
       <slist>
        <sitem>Original done at TPAC09</sitem>
        <sitem>Additional profile, name change, FPWD tweaks by HST: 2010-04, 05</sitem>
        <sitem>Per <loc href="http://www.w3.org/XML/XProc/2010/05/27-minutes.html"/>, minor edits in response to comments, also remove stale use of 'default' and 'model'</sitem>
        <sitem>Added new profile(s?) NDW: 2010-06-24</sitem>
        <sitem>Renamed most profiles, started on invariants section HST: 2010-07-01</sitem>
        <sitem>Adopted <loc href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2010Jul/0011.html">pgrosso's base URI and bibliography suggestions</loc>,
try to address <loc href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2010Jul/0013.html">pgrosso's concerns</loc> in section 3,
be a bit more expansive <loc href="http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2010Aug/0019.html">wrt impl-dep</loc>  HST: 2010-09-22</sitem>
        <sitem>Corrected one typo, added caveat wrt xml:id HST: 2010-10-12</sitem>
        <sitem>Added caveat to invariant claim HST: 2011-01-31</sitem>
        <sitem>Reverted caveat, and tried to address the data-model
construction requirements issue head-on HST: 2011-02-15</sitem>
        <sitem>Renamed and articulated some classes, changed status of notations
and unparsed entities, elt content whitespace, per feedback and telcon discussion
HST: 2011-02-17</sitem>
        <sitem>Adopted some but not all of Liam Quin's suggestions: http://lists.w3.org/Archives/Public/public-xml-processing-model-wg/2011Mar/0003.html</sitem>
        <sitem>Prepared for 2nd Last Call WD HST: 2011-03-30.</sitem>
        <sitem>Removed diff markup, added section on validation HST: 2011-07-21</sitem>
        <sitem>Some editorial fixes per minutes of 2011-10-06 HST: 2011-10-13</sitem>
        <sitem>Changes per minutes of 2011-10-13, to address <emph>inter alia</emph> LCC 3 from Liam Quin HST: 2011-10-13</sitem>
        <sitem>'implement' all diffs since 2011-04-12 WD by removing diff
markup HST: 2011-11-24</sitem>
        <sitem>Changes per actions 1, 4--8 in f2f minutes of 2011-10-31 HST: 2011-11-24</sitem>
        <sitem>Remaining actions from f2f, incl. pretty substantial terminology
changes HST: 2011-11-28</sitem>
        <sitem>Actions from f2f JF: 2011-12-15</sitem>
        <sitem>Simplification of invariants section, per f2f and subsequent
discussion with AM HST: 2011-12-15</sitem>
        <sitem>Added figure, coalesced short profile descriptions, other bits
per recent feedback HST: 2011-12-15</sitem>
        <sitem>Changed short prof. description layout per NW suggestion HST: 2011-12-16</sitem>
        <sitem>Added notes wrt validation, in response to CMSMCQ HSt: 2012-09-13</sitem>
       </slist>
      </revisiondesc>
 </header>
 <body>
  <div1 id="intro">
   <head>Introduction</head>
   <p>Few specifications are implemented in their entirety, in exactly the
same way, by every implementor. Many specifications contain optional
features or areas of acknowledged variation and some implementors
choose to ignore required features that aren't needed by the community
they serve, choosing to trade conformance for other benefits.</p>
   <p>In the case of XML, there are not only optional features
in the XML
Recommendation itself, but there are a whole family of additional
specifications which an implementor may choose to support or ignore.
In principle, there are an enormous number of possible variations. In
practice, there are dependencies between the specifications that limit
the number of possible variations and implementors aren't motivated to
implement completely arbitrary selections.</p>

<p>The <bibref ref="xml-infoset"/>
gave the community a vocabulary for discussing
the information items passed by an XML processor
to an application.  This specification 
  gives the community a vocabulary for describing common
  sets of higher level features by
  describing profiles, collecting specific sets of features
  drawn from the family of specifications, and providing names for them.</p>
   <p>One goal of this work is to help establish a lower bound on the number
and nature of features supported. The ability to communicate by sending XML documents back and forth
  is predicated on the notion that we have the same understanding of
  those documents. While we might
wish for the richest possible understanding, that's not likely to be
supported by the widest range of implementations. Establishing a few
basic profiles, we hope, provides a foundation on which other
specifications can build.</p>
   <div2 id="background">
    <head>Background</head>
<p>The XML specification <bibref ref="xml"/> defines an XML processor
as "a software module…used to read XML documents and provide
access to their content and structure…on behalf of another module,
called the application."

XML applications are often defined in terms of
operations on instances of XML data models such as
<bibref ref="xpath"/> or <bibref ref="xpath-datamodel"/>,
or on information identified by terms in the
<bibref ref="xml-infoset"/>
vocabulary.



Such definitions have suffered to some extent from an uncertainty
inherent in using that kind of foundation, in that the kind of
processing which XML processors carry out on XML documents, as well as
the amount of information they provide to applications as a result, is
flexible to a certain extent. Some of this flexibility stems from the
XML specification itself, which is not always explicit about what
information must be passed from processor to application, and which
also leaves open the possiblity of reading and interpreting external
entities, or not. Another kind of flexibility has arisen from the
growth of the XML family of specifications: if the input document
includes uses of XInclude, for instance, the XML processor
may or may not perform the indicated inclusions.</p>

   <p>This specification addresses this issue by defining several XML processor
profiles, each of which defines how any given XML
document should be processed, both operationally and in
terms of what information must be made available to applications.  It is intended as a resource for other specifications, which can by
a single normative reference establish precisely what input processing they
require as well as what information they require.</p>
   <p>The profiles presented here are designed for use with respect
to static outcomes, that is, to the result of XML processing as (if) produced by a
batch process. 
They do not attempt to address the question of the
preservation or lack thereof of information itself, or of information
invariants, in the course of incremental construction or in the face of
piecemeal modification.</p>
   <p>The profiles defined here are appropriate for processing both XML 1.0 <bibref ref="xml"/> and XML 1.1 <bibref ref="xml11"/> documents.  References to XML or XML Namespaces below should be understood as references to 1.0 or 1.1 as required by the relevant document or application.</p>
   </div2>

<div2 id="terminology">
<head>Terminology</head>

<p><termdef term="Must, May, etc." id="dt-must">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 term="base URI" id="dt-base-uri">A
<term>base URI</term>
is an absolute URI against which relative URIs are
resolved; this specification assumes that base URIs are established
and used as specified in <bibref ref="RFC3986"/>.</termdef></p>

<p><termdef term="implementation-defined" id="dt-implementation-defined">The term
<term>implementation-defined</term> indicates an aspect that may
differ between implementations, but must be specified by the
implementor for each particular implementation.</termdef></p>

<p><termdef term="implementation-dependent" id="dt-implementation-dependent">The term
<term>implementation-dependent</term> indicates an aspect that may
differ between implementations, is not specified by this or any W3C
specification, and is not required to be specified by the implementor
for any particular implementation.</termdef></p>

<p diff="add"><termdef term="profile" id="dt-profile">The term
<term>profile</term> refers to a named collection of items and properties
that must be made available to the application.
</termdef></p>
   </div2>
  </div1>
  <div1 id="profiles">
    <head>XML processor profiles</head>
    <p>The profile
definitions which follow all assume that the starting point is a <xspecref href="http://www.w3.org/TR/xml/#dt-wellformed">well-formed</xspecref> and <xspecref href="http://www.w3.org/TR/REC-xml-names/#dt-nwf">namespace well-formed</xspecref> XML document. This specification does not consider documents
that are not namespace well-formed. Documents which are not well-formed are not XML.</p>
   <p>Each profile is defined in terms of conformance requirements on processors
with respect to various XML-family specifications, and in terms of requirements
on the information they provide to applications.  Information provision requirements are specified by
reference to classes of information items and properties, as further defined in <specref ref="infosetClasses"/>.</p>

<p>It is the <emph>information</emph> itself which is required, not
the particular packaging of it implied by the items and properties
used to define those information classes. Processors typically package
information in terms of more-or-less standardized <kw>data models</kw>
or <kw>application program interfaces</kw> (APIs). How the information
required for conformance to a particular profile defined below is
conveyed by a data model or API need not correspond point-for-point to
the Infoset terminology. For example, a data model may
define
 element
content as an array of strings and not as an array
of characters. That does not prevent it from
conforming to the requirements expressed below in terms of the <bibref ref="xml-infoset"/>'s <kw>Character Information Items</kw>, for
example requirement (3) of <specref ref="basicProfile"/>.</p>

   <p>The four profiles defined here identify four increasingly rich
  profiles, in terms of kinds of processing and amount of information
  provided to applications, starting from a profile very close to what many XML
processors do already in their minimal configuration:</p>
   <ulist>
    <item><p><loc href="#basicProfile">The Basic profile</loc> adds only support for xml:base processing to
  the minimum expected of all processors, in order to allow for
  correct resolution of relative URIs;</p></item>
    <item><p><loc href="#idProfile">The Id profile</loc> adds xml:id processing in order to identify
  IDs in the possible absence of complete attribute type declaration
  information;</p></item>
    <item><p><loc href="#extDeclProfile">The External Declarations
profile</loc> adds mandatory external
  markup declaration processing in order to guarantee all
  information-affecting declarations are processed;</p></item>
    <item><p><loc href="#fullProfile">The Full profile</loc> adds xi:include processing, in order to
  transclude linked infosets as parsed XML or as text, recursively as
  required.</p></item>
   </ulist>
   <p>The precise nature of each of these profiles is described in the sections which follow.</p>
  <div2 id="basicProfile">
   <head>The basic XML processor profile</head>
   <p>To conform to the basic profile an XML processor <rfc2119>must</rfc2119></p>
   <olist>
    <item><p>Process the document as <xspecref href="http://www.w3.org/TR/xml/#proc-types">required of conformant
non-validating XML processors</xspecref> while not reading any <xspecref href="http://www.w3.org/TR/xml/#dt-extmkpdecl">external markup declarations</xspecref>;</p></item>
    <item><p>Maintain the <term>base URI</term> of each element in
conformance with <bibref ref="xml-base"/>;</p></item>
    <item><p>Accurately provide to the application the information in the
<phrase diff="del">document corresponding to information items and properties in</phrase>
classes <termref def="#Core">Core</termref>, <termref def="Signal">Signal</termref>, <termref def="Decl">Decl</termref> and <termref def="ImplDef">ImplDef</termref>;</p></item>
   </olist>

   <note>
    <p>Since the <bibref ref="xml"/> specification
    <emph>requires</emph> validating processors to read the external
    subset, it follows that a processor which validates cannot be
    conforming to this profile, nor to the <specref ref="idProfile"/>
    defined below.</p>
   </note>

   <note>
    <p>If an XML document which specifies <code>standalone="no"</code> in its XML
    Declaration is processed with either this profile or the <specref ref="idProfile"/>,
    defined below, the resulting infoset may be lacking items that the author deemed
    significant. This is not an error, because checking the standalone declaration
    is a validity constraint.</p>
   </note>
  </div2>

  <div2 id="idProfile">
   <head>The id XML processor profile</head>
   <p>To conform to the id profile an XML processor <rfc2119>must</rfc2119></p>
   <olist>
    <item><p>Process the document as <xspecref href="http://www.w3.org/TR/xml/#proc-types">required of conformant
non-validating XML processors</xspecref> while not reading any <xspecref href="http://www.w3.org/TR/xml/#dt-extmkpdecl">external markup declarations</xspecref>;</p></item>
    <item><p>Maintain the <term>base URI</term> of each element in
conformance with <bibref ref="xml-base"/>;</p></item>
    <item><p>Perform ID type assignment for all <code>xml:id</code> attributes as
required by <bibref ref="xml-id"/> by reporting their
<emph>attribute type</emph> Infoset property as <code>ID</code> to the application;</p></item>
    <item><p>Accurately provide to the application the information in the
<phrase diff="del">document corresponding to information items and properties in</phrase>
classes <termref def="Core">Core</termref>, <termref def="Signal">Signal</termref>, <termref def="Decl">Decl</termref> and <termref def="ImplDef">ImplDef</termref>.</p></item>
   </olist>

<note>
<p>This profile, like the <specref ref="basicProfile"/>, reads only declarations in
the internal subset, this means that types, such as ID, that appear in declarations
in the internal subset will be processed while such declarations in the external
subset will not.</p>
</note>

  </div2>

  <div2 id="extDeclProfile">
   <head>The external declarations XML processor profile</head>
   <p>To conform to the external declarations profile an XML processor <rfc2119>must</rfc2119></p>
   <olist>
    <item><p>Process the document as <xspecref href="http://www.w3.org/TR/xml/#proc-types">required of conformant
non-validating XML processors</xspecref> while reading and processing all <xspecref href="http://www.w3.org/TR/xml/#dt-extmkpdecl">external markup declarations</xspecref> (as
specified in <xspecref href="http://www.w3.org/TR/xml/#dt-use-mdecl">the discussion of non-validating processors in the XML specification</xspecref>);</p></item>
    <item><p>Maintain the <term>base URI</term> of each element in
conformance with <bibref ref="xml-base"/>;</p></item>
    <item><p>Perform ID type assignment for all <code>xml:id</code> attributes as
required by <bibref ref="xml-id"/> by reporting their
<emph>attribute type</emph> Infoset property as <code>ID</code> to the application;</p></item>
    <item><p>Accurately provide to the application the information in the
<phrase diff="del">document corresponding to information items and properties in</phrase>
classes <termref def="Core">Core</termref>, <termref def="Extended">Extended</termref>
and <termref def="ImplDef">ImplDef</termref>;</p></item>
   </olist>

   <note>
    <p>Conformance to this profile, or to the <specref ref="fullProfile"/> defined below, neither requires nor excludes
    validation. They leave it open to specifications which cite them
    to forbid, allow or require validation.</p>

    <p>A non-validating processor (see <emph>5.1 Validating and Non-Validating
    Processors</emph> in <bibref ref="xml"/>) conformant to this profile gives the
    complete infoset of a well-formed XML document. In the absence of well-formedness
    and validity errors, a validating processor using this profile gives the
    complete infoset of a valid XML document.</p>
   </note>
  </div2>

  <div2 id="fullProfile">
   <head>The full XML processor profile</head>
   <p>To conform to the full profile an XML processor <rfc2119>must</rfc2119></p>
   <olist>
    <item><p id="fpp1">Process the document as <xspecref href="http://www.w3.org/TR/xml/#proc-types">required of conformant
non-validating XML processors</xspecref> while reading and
processing all <xspecref href="http://www.w3.org/TR/xml/#dt-extmkpdecl">external markup declarations</xspecref> (as
specified in <xspecref href="http://www.w3.org/TR/xml/#dt-use-mdecl">the discussion of non-validating processors in the XML specification</xspecref>);</p></item>
    <item><p>Maintain the <term>base URI</term> of each element in
conformance with <bibref ref="xml-base"/>;</p></item>
    <item><p>Perform ID type assignment for all <code>xml:id</code> attributes as
required by <bibref ref="xml-id"/> by reporting their
<emph>attribute type</emph> Infoset property as <code>ID</code> to the application;</p></item>
    <item><p>Recursively replace all <code>include</code> elements in the XInclude
namespace, and carry out namespace, xml:base and xml:lang fixup of the result, as required for
conformance to <bibref ref="xinclude"/>;</p></item>
    <item><p>Accurately provide to the application the information in the
<phrase diff="del">document corresponding to information items and properties in</phrase>
classes <termref def="Core">Core</termref>, <termref def="Extended">Extended</termref>
and <termref def="ImplDef">ImplDef</termref>.</p></item>
   </olist>
   <p>The following <bibref ref="xproc"/> pipeline implements the <specref ref="fullProfile"/> when executed by a
conformant XProc processor which
</p>
   <ulist>
    <item>
     <p>Processes its input as required by <loc href="#fpp1">point 1</loc> above;</p>
    </item>
    <item>
     <p>Recognizes and reports the ID type of all <code>xml:id</code> attributes in
conformance with <bibref ref="xml-id"/>.</p>
    </item>
   </ulist>
   <example>
    <head>XProc pipeline which implements the full processor profile</head>
    <eg xml:space="preserve">&lt;p:pipeline xmlns:p="http://www.w3.org/ns/xproc"&gt;

  &lt;p:xinclude fixup-xml-base="true" fixup-xml-lang="true"/&gt;

&lt;/p:pipeline&gt;</eg>
   </example>
  </div2>
  </div1>
  <div1 id="infosetClasses">
   <head>Classes of Information</head>
   <p>For the profile definitions above and the invariants below, we
categorize the information expressed in XML documents, which
may be made available to applications, into a number of
(overlapping) classes.  What follows is a complete tabulation of all the
information items and their properties from <bibref ref="xml-infoset"/>, annotated
with one or more class labels.</p>
   <note>
    <p>The glosses which follow immediately below here are explanatory: the
actual class definitions are given in the subsequent table.</p>
   </note>
   <glist>
    <gitem id="Core">
     <label>Class Core</label>
     <def><p>Items and properties which are fundamental for
all XML applications and so <rfc2119>must</rfc2119> be provided by all profiles.</p></def>
    </gitem>
    <gitem id="Extended">
     <label>Class Extended</label>
     <def><p>Items and properties which depend on declarations and so
     <rfc2119>must</rfc2119> be provided by <specref ref="extDeclProfile"/> and <specref ref="fullProfile"/> only.
     These items and properties may be absent if the <specref ref="basicProfile"/> or <specref ref="idProfile"/> are used.</p>
     </def>
    </gitem>
    <gitem id="Signal">
     <label>Class Signal</label>
     <def><p>Items and properties which only are relevant when entity declarations are <emph>not</emph> available and so <rfc2119>must</rfc2119> be provided by <specref ref="basicProfile"/> and <specref ref="idProfile"/> only.</p>
     </def>
    </gitem>
    <gitem id="Decl">
     <label>Class Decl</label>
     <def><p>Items and properties which depend on declarations. 
For <specref ref="basicProfile"/> and <specref ref="idProfile"/>, they will not be provided if the relevant declaration
is in an unprocessed external entity, or is after the first reference to an external entity
which is not processed.</p>
     </def>
    </gitem>
    <gitem id="Validated">
     <label>Class Validated</label>
     <def><p>Items and properties which will be present for
validating processors, but for which support by <emph>non-</emph>validating processors is
implementation-defined.  Non-validating processors <rfc2119>must</rfc2119> document whether they
provide this information to applications or not. </p>
     </def>
    </gitem>
    <gitem id="ImplDef">
     <label>Class ImplDef</label>
     <def><p>Items and properties for which support is
implementation-defined.  Processors <rfc2119>must</rfc2119> document whether they
provide this information to applications or not.</p>
     </def>
    </gitem>
   </glist>
   <p>The tabulation which follows defines the information classes by
enumerating their membership in terms of information items and their
properties&mdash;each class contains all and only those items and properties
against which its name appears below.</p>
   <glist><gitem><label>Document Information Item</label>
<def>
 <table width="100%">
  <col width="30%"/>
  <tbody>
   <tr><td>the item itself</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[children]</td><td><termref def="ImplDef">ImplDef</termref></td></tr>
   <tr><td>[document element]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[notations]</td><td><termref def="Extended">Extended</termref>, <termref def="Decl">Decl</termref></td></tr>
   <tr><td>[unparsed entities]</td><td><termref def="Extended">Extended</termref>, <termref def="Decl">Decl</termref></td></tr>
   <tr><td>[base URI]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[character encoding scheme]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[standalone]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[version]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[all declarations processed]</td><td><termref def="Core">Core</termref></td></tr>
  </tbody>
 </table>
</def></gitem>
<gitem><label>Element Information Item</label>
<def>
 <table width="100%">
  <col width="30%"/>
  <tbody>
   <tr><td>the item itself</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[namespace name]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[local name]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[prefix]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[children]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[attributes]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[namespace attributes]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[in-scope namespaces]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[base URI]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[parent]</td><td><termref def="Core">Core</termref></td></tr>
  </tbody>
 </table>
</def></gitem>
<gitem><label>Attribute Information Item</label>
<def>
 <table width="100%">
  <col width="30%"/>
  <tbody>
   <tr><td>the item itself</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[namespace name]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[local name]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[prefix]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[normalized value]</td><td><termref def="Extended">Extended</termref>, <termref def="Decl">Decl</termref></td></tr>
   <tr><td>[specified]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[attribute type]</td><td><termref def="Extended">Extended</termref>, <termref def="Decl">Decl</termref></td></tr>
   <tr><td>[references] to Element Information Items, i.e. for attributes of types IDREF and IDREFS</td><td><termref def="Extended">Extended</termref>, <termref def="Decl">Decl</termref></td></tr>
   <tr><td>[references] to Notation and Unparsed Entity Information Items, i.e. for attributes of types ENTITY, ENTITIES and NOTATION</td><td><termref def="ImplDef">ImplDef</termref></td></tr>
   <tr><td>[owner element]</td><td><termref def="Core">Core</termref></td></tr>
  </tbody>
 </table>
</def></gitem>
<gitem><label>Processing Instruction Information Item</label>
<def>
 <table width="100%">
  <col width="30%"/>
  <tbody>
   <tr><td>the item itself</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[target]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[content]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[base URI]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[notation]</td><td><termref def="ImplDef">ImplDef</termref></td></tr>
   <tr><td>[parent]</td><td><termref def="Core">Core</termref></td></tr>
  </tbody>
 </table>
</def></gitem>
     <gitem><label>Unexpanded Entity Reference Information Item</label>
<def>
<note><p>This type of information item will not occur at all if
<code>standalone="yes"</code><phrase diff="add">is specified and is correct.</phrase>
</p></note>
 <table width="100%">
  <col width="30%"/>
  <tbody>
   <tr><td>the item itself</td><td><termref def="Signal">Signal</termref></td></tr>
   <tr><td><emph>all properties</emph></td><td><termref def="Signal">Signal</termref></td></tr>
  </tbody>
 </table>
</def></gitem>
<gitem><label>Character Information Item</label>
<def>
 <table width="100%">
  <col width="30%"/>
  <tbody>
   <tr><td>the item itself</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[character code]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[element content whitespace]</td><td><termref def="Validated">Validated</termref></td></tr>
   <tr><td>[parent]</td><td><termref def="Core">Core</termref></td></tr>
  </tbody>
 </table>
</def></gitem>
<gitem><label>Comment Information Item</label>
<def>
 <table width="100%">
  <col width="30%"/>
  <tbody>
   <tr><td>the item itself</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[content]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[parent]</td><td><termref def="Core">Core</termref></td></tr>
  </tbody>
 </table>
</def></gitem>
    <gitem>
<label>Document Type Declaration Information Item</label>
     <def><table width="100%">
  <col width="30%"/>
  <tbody>
   <tr><td>the item itself</td><td><termref def="ImplDef">ImplDef</termref></td></tr>
   <tr><td><emph>all properties</emph></td><td><termref def="ImplDef">ImplDef</termref></td></tr>
  </tbody>
 </table></def>
    </gitem>
    <gitem><label>Unparsed Entity Information Item</label>
<def><table width="100%">
  <col width="30%"/>
  <tbody>
   <tr><td>the item itself</td><td><termref def="Extended">Extended</termref>, <termref def="Decl">Decl</termref></td></tr>
   <tr><td><emph>all properties</emph></td><td><termref def="Extended">Extended</termref>, <termref def="Decl">Decl</termref></td></tr>
  </tbody>
 </table></def></gitem>
<gitem><label>Notation Information Item</label>
<def><table width="100%">
  <col width="30%"/>
  <tbody>
   <tr><td>the item itself</td><td><termref def="Extended">Extended</termref>, <termref def="Decl">Decl</termref></td></tr>
   <tr><td><emph>all properties</emph></td><td><termref def="Extended">Extended</termref>, <termref def="Decl">Decl</termref></td></tr>
  </tbody>
 </table></def></gitem>
<gitem><label>Namespace Information Item</label>
<def>
 <table width="100%">
  <col width="30%"/>
  <tbody>
   <tr><td>the item itself</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[prefix]</td><td><termref def="Core">Core</termref></td></tr>
   <tr><td>[namespace name]</td><td><termref def="Core">Core</termref></td></tr>
  </tbody>
 </table>
</def></gitem>
</glist>
  </div1>
  <div1 id="invariants">
   <head>Relations and Invariants</head>
   <p>Whenever a
document is processed in conformance with one of the profiles defined
above, the information made available to applications  will
be guaranteed to have certain properties. The relation between the profiles and information classes
defined above is summarized in the illustration below (<loc href="xmlprocprofiles1.png">PNG</loc>,<loc href="xmlprocprofiles1.svg">SVG</loc>), then the sub-sections which follow describe
this in terms of invariants with respect to the information made available.</p>
   <graphic alt="Venn diagram of profiles and classes" source="xmlprocprofiles1.png"/>
<p>Note: in an effort to maintain consistent
relationships in the diagram, the label for the inner-most circle,
around “Full Profile”, has been omitted. It should be read as if it was
labeled “Perform XInclude processing”.
</p>
    <p>The following table summarizes the properties associated with each profile.</p>
    <table border="1" >
      <thead>
        <tr align="center">
          <th>Profiles</th>
          <th>process with non validating XML Processor</th>
          <th>maintain base URI</th>
          <th>signal+decl class</th>
          <th>core+impldef class</th>
          <th>ID type assignment</th>
          <th>Extended class</th>
          <th>Perform XInclude Processing</th>
        </tr>
      </thead>
      <tbody align="center">
        <tr align="center">
          <td align="left"><xspecref href="#basicProfile">Basic Profile</xspecref></td>
          <td>X</td>
          <td>X</td>
          <td>X</td>
          <td>X</td>
          <td></td>
          <td></td>
          <td></td>
        </tr>
        <tr>
          <td align="left"><xspecref href="#idProfile">ID Profile</xspecref></td>
          <td>X</td>
          <td>X</td>
          <td>X</td>
          <td>X</td>
          <td>X</td>
          <td></td>
          <td></td>
        </tr>        
        <tr>
          <td align="left"><xspecref href="#extDeclProfile">External Decl Profile</xspecref></td>
          <td>X</td>
          <td>X</td>
          <td></td>
          <td>X</td>
          <td>X</td>
          <td>X</td>
          <td></td>
        </tr>        
        <tr>
          <td align="left"><xspecref href="#fullProfile">Full Profile</xspecref></td>
          <td>X</td>
          <td>X</td>
          <td></td>
          <td>X</td>
          <td>X</td>
          <td>X</td>
          <td>X</td>
        </tr>
      </tbody>
    </table>
    
   <div2 id="within_profile_invariants">
    <head>Information invariants within a given profile</head>
    <p>Every instance of processing a given namespace-well-formed XML
document in conformance with the
<emph>same</emph> profile will make available
exactly the same information with respect to the information items and
properties which
that profile is required to provide accurately, as tabulated above.</p>
   </div2>
   <div2 id="between_profile_variants">
    <head>Information variation between profiles</head>
    <p>In comparing two cases when a given namespace-well-formed XML
document is processed in conformance with
two <emph>different</emph> profiles, the information made available will in some cases (depending on
the specifics of the document in question) differ with respect to the following information items and
properties (leaving aside the items and
properties classified as implementation-defined above):</p>
    <div3 id="min_variants">
     <head>Between basic and richer profiles</head>
     <glist>
<gitem><label>Attribute Information Items</label>
<def><p>
[normalized value],
[attribute type],
[references]&mdash;These properties may vary for <code>xml:id</code> attributes
</p></def></gitem>
</glist>
     <p>And all the differences listed in the next two sections.</p>
    </div3>
    <div3 id="id_variants">
     <head>Between id and richer profiles</head>
     <p>Where an id processor reports an Unexpanded Entity
Reference, richer ones will report the entity expansion, that is, they will report
some number of information items and their associated properties.  For this reason,
the information reported from an id processor may differ from that reported by
a processor conforming to a richer profile with respect to any or all of
Element, Attribute, Character, Comment, Namespace, Processing Instruction and
Unexpanded Entity Reference Information Items.</p>
     <glist>
<gitem><label>Attribute Information Items</label>
<def><p>With respect to [normalized value],
[specified],
[attribute type] and
[references] where an id processor has not processed the relevant
declaration, but a richer one has.</p></def></gitem>
</glist>
     <p>And all the differences listed in the next section.</p>
    </div3>
    <div3 id="modest_variants">
     <head>Between external declarations and full profiles</head>
     <p>Parallel to the case for expanding entity references in the previous
section, XInclude processing in conformance with the full profile may replace
some (XInclude) Element Information Items reported by processing in conformance
to other profiles with some number of different
Element, Attribute, Character, Comment,
Namespace and Processing Instruction Information Items.</p>
    </div3>
   </div2>
  </div1>
  <div1 id="otherProfiles">
   <head>Other profiles (non-normative)</head>
   <p>The profiles defined here can be used as a starting point for the definition of further profiles.  For example, the media type registrations for stylesheet languages applicable to XML such as <code>application/xslt+xml</code> or <code>text/css</code> might define a profile specifying appropriate <code>&lt;?xml-stylesheet type="[their media type]"…?&gt;</code> processing in addition to the processing required by <specref ref="idProfile"/>.</p>
  </div1>
<!--
  <div1 id="conformance">
   <head>Conformance</head>
   <p>Conformance to this specification means conformance by XML processors to profiles, as specified in <specref ref="profiles"/>.</p>
   <p>Which profile or profiles an XML processor conforms to may depend on how it is configured.  The conformance conditions for any specific
 processor configuration with respect to each profile are specified in the
corresponding sub-section of <specref ref="profiles"/>.</p>
   <p>Accordingly, any specification which references this one
normatively
is <rfc2119>recommended</rfc2119> to do so in terms such as "Conforming implementations
<rfc2119>must</rfc2119> process XML documents and make information available as
required by the <xspecref href="http://www.w3.org/TR/xml-proc-profiles/#idProfile">id
XML processor profile</xspecref>."</p>
  </div1>
-->
  <div1 id="validation">
   <head>Validation (Non-normative)</head>
   <p>Specifying desired information outcomes is not sufficient to completely
determine XML processor behavior.  In particular, if validation is performed
and errors detected, the result may be no outcome at all.</p>
   <p>A range of schema languages and approaches to validation
exist.  Some may provide for additional information items and/or properties
which are not addressed by this specification.  Also, the validation-dependent   [element content whitespace] property of Character Information Items
may only be
reliably provided in conjunction with some approaches
to validation, specifically DTD validation.</p>
   <p>Furthermore, not all of the profiles defined above <emph>can</emph> be combined with all forms of validation:  in particular, DTD
validation requires that all <xspecref href="http://www.w3.org/TR/xml/#dt-extmkpdecl">external markup declarations</xspecref> be <phrase diff="del">read and </phrase>processed, and so cannot be required in conjunction with <specref ref="basicProfile"/> or <specref ref="idProfile"/>.</p>
   <p>Accordingly, specifications referencing this one <rfc2119>should</rfc2119> also specify
whether validation is forbidden, optional or required, with respect to which
schema language(s) with what validation control settings, if
any.  If the <specref ref="fullProfile"/> is involved,
careful consideration is required as to whether validation is to happen before XInclude processing, or after, or both.</p>
   <div2 diff="add" id="val_lang">
    <head>Specifying validation</head>
    <p>Given the number of XML validation technologies available, and the
constraints on where in the process they can occur, specifying patterns of
required, allowed or forbidden validation may not be straight-forward.</p>
    <p>To enable a degree of consistency in this area, specifications are
<rfc2119>recommended</rfc2119> to consult the following diagrams, and express
their requirements in this area with reference to them:</p>
    <p id="validation_fig_1"><graphic alt="Basic and id profiles validation flow chart" source="xpp_fig1.png"/></p>
    <p id="validation_fig_2"><graphic alt="External declaration profile validation flow chart" source="xpp_fig2.png"/></p>
    <p id="validation_fig_3"><graphic alt="Full profile validation flow chart" source="xpp_fig3.png"/></p>
    <p>Examples of recommended wording:</p>
    <example>
     <p>Conforming implementations <rfc2119>must</rfc2119> process XML
documents and make information available as required by the id XML processor
profile, with no non-DTD validation (<loc href="#validation_fig_1">A</loc>).</p>
     </example>
    <example>
     <p>... the id XML processor profile, with validation (<loc href="#validation_fig_1">A</loc>) using <xspecref href="http://www.w3.org/TR/xmlschema-1/">XML Schema 1.0</xspecref> followed optionally by validation (<loc href="#validation_fig_1">B</loc>) using <xspecref href="http://www.iso.org/iso/home/store/catalogue_tc/catalogue_detail.htm?csnumber=40833">Schematron</xspecref>.</p>
    </example>
    <example>
     <p>... the external declarations XML processor profile, with DTD
validation (<loc href="#validation_fig_2">A</loc>) followed by validation (<loc href="#validation_fig_2">B</loc>) using <xspecref href="http://www.w3.org/TR/xmlschema-1/">XML Schema 1.1</xspecref> with support for the <xspecref href="http://www.w3.org/TR/xmlschema11-1/#var_terminology">lightweight type-aware subset</xspecref> of the PSVI.</p>
    </example>
    <example>
     <p>... the full XML processor profile, with DTD
validation (<loc href="#validation_fig_3">A</loc>), then XInclude, then
validation (<loc href="#validation_fig_3">D</loc>) using <xspecref href="http://www.iso.org/iso/home/store/catalogue_ics/catalogue_detail_ics.htm?csnumber=52348">Relax NG</xspecref>.</p>
    </example>
   </div2>
  </div1>
 </body>
 <back>
  <div1 id="references">
<head>References</head>

<blist>
  <bibl key="XML Information Set" id="xml-infoset">
    <titleref href="http://www.w3.org/TR/xml-infoset/">XML Information Set</titleref>,
    World Wide Web Consortium.  Most recent edition (the second) is dated
04 Feb 2004, John Cowan and Richard Tobin, Editors.
    The <loc href="http://www.w3.org/TR/xml-infoset/">latest version</loc>
    is available at http://www.w3.org/TR/xml-infoset/.
  </bibl>
<bibl key="RFC 2119" id="RFC2119">
  <titleref href="http://www.ietf.org/rfc/rfc2119.txt">RFC 2119: Key words for use in RFCs to Indicate Requirement Levels</titleref>.
  <emph>Internet Engineering Task Force, 1997.</emph>
</bibl>

<bibl key="RFC 3986" id="RFC3986">
  <titleref href="http://www.ietf.org/rfc/rfc3986.txt">RFC 3986: Uniform Resource Identifier (URI): Generic Syntax</titleref>.
  <emph>Internet Engineering Task Force, 2005.</emph>
</bibl>
   <bibl key="XProc: An XML Pipeline Language" id="xproc">
     <titleref href="http://www.w3.org/TR/xproc/">XProc: An XML Pipeline Language</titleref>,
     Norman Walsh, Alex Milowski, and Henry S. Thompson, Editors.
     World Wide Web Consortium, 9 March 2010.
     This version is http://www.w3.org/TR/2010/REC-xproc-20100511/.
     The <loc href="http://www.w3.org/TR/xproc/">latest version</loc>
     is available at http://www.w3.org/TR/xproc/.
   </bibl>
 
 <bibl key="XPath 2.0" id="xpath2">
  <titleref href="http://www.w3.org/TR/xpath20/">XML Path Language (XPath) 2.0
(Second Edition)</titleref>, Anders Berglund et al. Editors.  World Wide Web
Consortium, 14 December 2010.  This version is
http://www.w3.org/TR/2010/REC-xpath20-20101214/.  The <loc href="http://www.w3.org/TR/xpath20/">latest version</loc> is available at http://www.w3.org/TR/xpath20/.</bibl>

  <bibl key="xml:id Version 1.0" id="xml-id">
    <titleref href="http://www.w3.org/TR/xml-id/">xml:id Version 1.0</titleref>,
    Norman Walsh, Daniel Veillard, and Jonathan Marsh, Editors.
    World Wide Web Consortium, 09 Sep 2005.
    This version is http://www.w3.org/TR/2005/REC-xml-id-20050909/.
    The <loc href="http://www.w3.org/TR/xml-id/">latest version</loc>
    is available at http://www.w3.org/TR/xml-id/.
  </bibl>

  <bibl key="XML Inclusions (XInclude) Version 1.0 (Second Edition)" id="xinclude">
    <titleref href="http://www.w3.org/TR/xinclude/">XML Inclusions (XInclude) Version 1.0 (Second Edition)</titleref>,
    David Orchard, Jonathan Marsh, and Daniel Veillard, Editors.
    World Wide Web Consortium, 15 Nov 2006.
    This version is http://www.w3.org/TR/2006/REC-xinclude-20061115/.
    The <loc href="http://www.w3.org/TR/xinclude/">latest version</loc>
    is available at http://www.w3.org/TR/xinclude/.</bibl>

   <bibl key="Extensible Markup Language (XML) 1.0 (Fifth Edition)" id="xml">
     <titleref href="http://www.w3.org/TR/xml/">Extensible Markup Language (XML) 1.0 (Fifth Edition)</titleref>,
     Tim Bray, Jean Paoli, C. M. Sperberg-McQueen, <emph>et. al.</emph>, Editors.
     World Wide Web Consortium, 28 Nov 2008.
     This version is http://www.w3.org/TR/2008/REC-xml-20081126/.
     The <loc href="http://www.w3.org/TR/xml/">latest version</loc>
     is available at http://www.w3.org/TR/xml/.
   </bibl>

   <bibl key="Extensible Markup Language (XML) 1.1 (Second Edition)" id="xml11">
     <titleref href="http://www.w3.org/TR/xml11/">Extensible Markup Language (XML) 1.1 (Second Edition)</titleref>,
     Tim Bray, John Cowan, Jean Paoli, <emph>et. al.</emph>, Editors.
     World Wide Web Consortium, 16 Aug 2006.
     This version is http://www.w3.org/TR/2006/REC-xml11-20060816/.
     The <loc href="http://www.w3.org/TR/xml11/">latest version</loc>
     is available at http://www.w3.org/TR/xml11/.
   </bibl>
 
<bibl key="Namespaces in XML 1.0 (Third Edition)" id="xml-names">
      <titleref href="http://www.w3.org/TR/xml-names/">Namespaces in
XML 1.0 (Third Edition)</titleref>, Tim Bray, Dave Hollander, Richard
Tobin, and Andrew Layman, Editors. World Wide Web Consortium,
8 Dec 2009. This version is
http://www.w3.org/TR/2009/REC-xml-names-20091208/. The <loc href="http://www.w3.org/TR/xml-names/">latest version</loc> is available
at http://www.w3.org/TR/xml-names/.</bibl>
 <bibl key="Namespaces in XML 1.1 (Second Edition)" id="xml-names11">
      <titleref href="http://www.w3.org/TR/xml-names11/">Namespaces in XML 1.1 (Second Edition)</titleref>, Tim Bray, Dave Hollander, Andrew Layman, and Richard Tobin, Editors. World Wide Web Consortium, 16 Aug 2006. This version is http://www.w3.org/TR/2006/REC-xml-names11-20060816/. The <loc href="http://www.w3.org/TR/xml-names11/">latest version</loc> is available at http://www.w3.org/TR/xml-names11/.</bibl>
 <bibl key="XML Base" id="xml-base">
     <titleref href="http://www.w3.org/TR/xmlbase/">XML Base (Second Edition)</titleref>,
     Jonathan Marsh, Editor. World Wide Web Consortium, 28 January 2009.
     This version is http://www.w3.org/TR/2009/REC-xmlbase-20090128/.
     The <loc href="http://www.w3.org/TR/xmlbase/">latest version</loc>
     is available at http://www.w3.org/TR/xmlbase/.
   </bibl>

   <bibl key="XML Path Language (XPath) Version 1.0" id="xpath">
     <titleref href="http://www.w3.org/TR/xpath/">XML Path Language (XPath) Version 1.0</titleref>,
     James Clark and Steven DeRose, Editors.
     World Wide Web Consortium, 16 Nov 1999.
     This version is http://www.w3.org/TR/1999/REC-xpath-19991116/.
     The <loc href="http://www.w3.org/TR/xpath/">latest version</loc>
     is available at http://www.w3.org/TR/xpath/.
   </bibl>

   <bibl key="XQuery 1.0 and XPath 2.0 Data Model (XDM)" id="xpath-datamodel">
     <titleref href="http://www.w3.org/TR/xpath-datamodel/">XQuery 1.0 and XPath 2.0 Data Model (XDM)</titleref>,
     Ashok Malhotra, Jonathan Marsh, Norman Walsh, <emph>et al.</emph>, Editors.
     World Wide Web Consortium, 14 Dec 2010.
     This version is http://www.w3.org/TR/2010/REC-xpath-datamodel-20101214/.
     The <loc href="http://www.w3.org/TR/xpath-datamodel/">latest version</loc>
     is available at http://www.w3.org/TR/xpath-datamodel/.
   </bibl>
</blist>
</div1>
 </back>
</spec>
