Lines Matching full:entity
5 publication. --><!ENTITY XML.version "1.0">
6 <!ENTITY doc.date "10 February 1998">
7 <!ENTITY iso6.doc.date "19980210">
8 <!ENTITY w3c.doc.date "02-Feb-1998">
9 <!ENTITY draft.day "10">
10 <!ENTITY draft.month "February">
11 <!ENTITY draft.year "1998">
12 <!ENTITY WebSGML "WebSGML Adaptations Annex to ISO 8879">
13 <!ENTITY lt "<">
14 <!ENTITY gt ">">
15 <!ENTITY xmlpio "'<?xml'">
16 <!ENTITY pic "'?>'">
17 <!ENTITY br "\n">
18 <!ENTITY cellback "#c0d9c0">
19 <!ENTITY mdash "--">
20 <!-- —, but nsgmls doesn't grok hex --><!ENTITY com "--">
21 <!ENTITY como "--">
22 <!ENTITY comc "--">
23 <!ENTITY hcro "&#x">
24 <!-- <!ENTITY nbsp "?"> --><!ENTITY nbsp " ">
25 <!ENTITY magicents "<code>amp</code>,
30 <!-- audience and distribution status: for use at publication time --><!ENTITY doc.audience "public review and discussion">
31 <!ENTITY doc.distribution "may be distributed freely, as long as
143 change expansion of entity WebSGML,
207 Add WFC requiring encoding decl to come first in an entity.
245 <sitem>1997-03-29 : CMSMcQ : some Henry Thompson (on entity handling),
256 vice versa for entity text and Literal. (I'd call it Entity Text,
267 WWW conference April 1997: restore some of the internal entity
286 Don't require exposure of entity boundaries.
288 Reserve entity names of the form u-NNNN.
295 Add new rhs to entity declaration, for parameter entities.</sitem>
301 <sitem>1996-10-31 : TB : Add Entity Handling section</sitem>
317 introduce some EBNF for entity declarations.</sitem>
366 <p>XML documents are made up of storage units called <termref def="dt-entity">entities</termref>, which contain either parsed
552 Physically, the document is composed of units called <termref def="dt-entity">entities</termref>. An entity may <termref def="dt-entref">refer</termref> to other entities to cause their
553 inclusion in the document. A document begins in a "root" or <termref def="dt-docent">document entity</termref>.
628 <p><termdef id="dt-text" term="Text">A parsed entity contains
653 vary from entity to entity. All XML processors must accept the UTF-8
800 <termref def="dt-entref">entity references</termref>,
817 They are also legal within the <termref def="dt-litentval">literal entity
818 value</termref> of an internal entity declaration; see
820 <!-- FINAL EDIT: restore internal entity decl or leave it out. -->
1057 <termref def="dt-extent">external entity</termref>) containing markup
1068 an <termref def="dt-entdecl">entity declaration</termref>, or
1125 <p>Parameter-entity
1132 <termref def="dt-PERef">parameter-entity reference</termref>,
1138 <termref def="dt-PERef">parameter-entity references</termref>
1151 or <termref def="dt-PERef">parameter-entity references</termref>.
1177 <termref def="dt-PERef">parameter-entity references</termref>
1198 This has the effect that entity and attribute-list declarations in the
1207 to an application; examples are attribute defaults and entity
1212 the <termref def="dt-docent">document entity</termref>.
1229 entity</termref> (either in the DTD external subset, or in an
1230 external parameter entity referenced from the internal subset)
1326 wherever an external parsed entity or the literal entity value
1327 of an internal parsed entity contains either the literal
1563 <head>No External Entity References</head>
1565 Attribute values cannot contain direct or indirect entity references
1571 <p>The <termref def="dt-repltext">replacement text</termref> of any entity
1766 <p>Parameter-entity
1773 <termref def="dt-PERef">parameter entity</termref>,
1776 if a parameter-entity reference appears in a
1925 <rhs>| 'ENTITY'</rhs>
1968 <head>Entity Name</head>
1970 Values of type <kw>ENTITY</kw>
1976 name of an <termref def="dt-unparsed">unparsed entity</termref> declared in the
2132 <item><p>an entity reference is processed by recursively processing the
2133 replacement text of the entity</p></item>
2137 parsed entity or the literal entity value of an internal parsed
2138 entity</p></item>
2217 parameter-entity reference, the parameter entity must be replaced by its
2221 <eg><!ENTITY % draft 'INCLUDE' >
2222 <!ENTITY % final 'IGNORE' >
2263 <p><termdef id="dt-entity" term="Entity">An XML document may consist
2266 (except for the document entity, see below, and
2270 Each XML document has one entity
2271 called the <termref def="dt-docent">document entity</termref>, which serves
2275 <termdef id="dt-parsedent" term="Text Entity">A <term>parsed entity's</term>
2281 <p><termdef id="dt-unparsed" term="Unparsed Entity">An
2282 <term>unparsed entity</term>
2285 Each unparsed entity
2288 that an XML processor make the identifiers for the entity and
2293 Parsed entities are invoked by name using entity references;
2294 unparsed entities by name, given in the value of <kw>ENTITY</kw>
2297 <p><termdef id="gen-entity" term="general entity"><term>General entities</term>
2300 to with the unqualified term <emph>entity</emph> when this leads
2302 <termdef id="dt-PE" term="Parameter entity">Parameter entities
2306 Furthermore, they occupy different namespaces; a parameter entity and
2307 a general entity with the same name are two distinct entities.
2311 <head>Character and Entity References</head>
2338 <p><termdef id="dt-entref" term="Entity Reference">An <term>entity
2339 reference</term> refers to the content of a named entity.</termdef>
2340 <termdef id="dt-GERef" term="General Entity Reference">References to
2344 <termdef id="dt-PERef" term="Parameter-entity reference">
2345 <term>Parameter-entity references</term> use percent-sign (<code>%</code>) and
2350 <head>Entity Reference</head>
2370 <head>Entity Declared</head>
2372 DTD subset which contains no parameter entity references, or a document with
2374 the <nt def="NT-Name">Name</nt> given in the entity reference must
2376 <titleref href="sec-entity-decl">entity declaration</titleref>, except that
2379 The declaration of a parameter entity must precede any reference to it.
2380 Similarly, the declaration of a general entity must precede any
2387 an entity must be declared is a well-formedness constraint only
2391 <head>Entity Declared</head>
2394 the <nt def="NT-Name">Name</nt> given in the entity reference must <termref def="dt-match">match</termref> that in an
2395 <titleref href="sec-entity-decl">entity declaration</titleref>.
2399 The declaration of a parameter entity must precede any reference to it.
2400 Similarly, the declaration of a general entity must precede any
2406 <head>Parsed Entity</head>
2408 An entity reference must not contain the name of an <termref def="dt-unparsed">unparsed entity</termref>. Unparsed entities may be referred
2410 be of type <kw>ENTITY</kw> or <kw>ENTITIES</kw>.
2416 A parsed entity must not contain a recursive reference to itself,
2423 Parameter-entity references may only appear in the
2427 <p>Examples of character and entity references:
2431 <p>Example of a parameter-entity reference:
2432 <eg><![CDATA[<!-- declare the parameter entity "ISOLat2"... -->
2433 <!ENTITY % ISOLat2
2439 <div2 id="sec-entity-decl">
2440 <head>Entity Declarations</head>
2442 <p><termdef id="dt-entdecl" term="entity declaration">
2445 <head>Entity Declaration</head>
2453 <rhs>'<!ENTITY' <nt def="NT-S">S</nt> <nt def="NT-Name">Name</nt>
2458 <rhs>'<!ENTITY' <nt def="NT-S">S</nt> '%' <nt def="NT-S">S</nt>
2476 The <nt def="NT-Name">Name</nt> identifies the entity in an
2477 <termref def="dt-entref">entity reference</termref> or, in the case of an
2478 unparsed entity, in the value of an <kw>ENTITY
2480 If the same entity is declared more than once, the first declaration
2488 <p><termdef id="dt-internent" term="Internal Entity Replacement Text">If
2489 the entity definition is an
2491 the defined entity is called an <term>internal entity</term>.
2493 storage object, and the content of the entity is given in the
2495 Note that some processing of entity and character references in the
2496 <termref def="dt-litentval">literal entity value</termref> may be required to
2500 <p>An internal entity is a <termref def="dt-parsedent">parsed
2501 entity</termref>.</p>
2502 <p>Example of an internal entity declaration:
2503 <eg><!ENTITY Pub-Status "This is a pre-release of the
2510 <p><termdef id="dt-extent" term="External Entity">If the entity is not
2512 entity</term>, declared as follows:
2514 <head>External Entity Declaration</head>
2534 entity</termref>; otherwise it is a parsed entity.</termdef></p>
2544 is called the entity's <term>system identifier</term>. It is a URI,
2545 which may be used to retrieve the entity.</termdef>
2554 resource within which the entity declaration occurs.
2556 <termref def="dt-docent">document entity</termref>, to the entity
2558 or to some other <termref def="dt-extent">external parameter entity</termref>.
2568 An XML processor attempting to retrieve the entity's content may use the public
2574 <p>Examples of external entity declarations:
2575 <eg><!ENTITY open-hatch
2577 <!ENTITY open-hatch
2580 <!ENTITY hatch-pic
2606 by reference to a parsed entity.
2608 an external parsed entity.</p>
2612 <p>The document entity is well-formed if it matches the production labeled
2615 parsed entity is well-formed if it matches the production labeled
2618 entity is well-formed if it matches the production labeled
2621 <head>Well-Formed External Parsed Entity</head>
2631 An internal general parsed entity is well-formed if its replacement text
2646 <termref def="dt-entref">entity reference</termref>
2647 can begin in one entity and end in another.</p>
2652 <p>Each external parsed entity in an XML document may use a different
2685 In the <termref def="dt-docent">document entity</termref>, the encoding
2717 it is an <termref def="dt-error">error</termref> for an entity including
2721 of an external entity, or for
2722 an entity which begins with neither a Byte Order Mark nor an encoding
2729 encounters an entity with an encoding that it is unable to process.</p>
2738 entity references, and invocations of unparsed entities might appear and the
2760 attribute which has been declared as type <kw>ENTITY</kw>, or as one of
2764 <gitem><label>Reference in Entity Value</label>
2766 within a parameter or internal entity's
2767 <termref def="dt-litentval">literal entity value</termref> in
2768 the entity's declaration; corresponds to the nonterminal
2780 <td bgcolor="&cellback;" align="center" valign="bottom" colspan="4">Entity Type</td>
2842 special significance; thus, what would be parameter entity references in the
2850 <p><termdef id="dt-include" term="Include">An entity is
2864 as an entity-reference delimiter.)
2871 <p>When an XML processor recognizes a reference to a parsed entity, in order
2876 If the entity is external, and the processor is not
2879 include the entity's replacement text.
2882 read, the entity.</p>
2884 provided by the SGML and XML entity mechanism, primarily designed
2887 Browsers, for example, when encountering an external parsed entity reference,
2888 might choose to provide a visual indication of the entity's
2898 <termref def="dt-unparsed">unparsed entity</termref>.
2900 <item><p>the appearance of any character or general-entity reference in the
2903 <item><p>a reference to an external entity in an attribute value.</p>
2910 <p>When an <termref def="dt-entref">entity reference</termref> appears in an
2911 attribute value, or a parameter entity reference appears in a literal entity
2919 <eg><![CDATA[<!ENTITY % YN '"Yes"' >
2920 <!ENTITY WhatHeSaid "He said &YN;" >]]></eg>
2922 <eg><!ENTITY EndAttr "27'" >
2928 entity</termref> appears as a token in the
2929 value of an attribute of declared type <kw>ENTITY</kw> or <kw>ENTITIES</kw>,
2933 identifiers for both the entity and its associated
2938 <p>When a general entity reference appears in the
2939 <nt def="NT-EntityValue">EntityValue</nt> in an entity declaration,
2947 When a parameter-entity reference is recognized in the DTD
2959 <head>Construction of Internal Entity Replacement Text</head>
2962 useful to distinguish two forms of the entity's value.
2963 <termdef id="dt-litentval" term="Literal Entity Value">The <term>literal
2964 entity value</term> is the quoted string actually
2965 present in the entity declaration, corresponding to the
2968 text</term> is the content of the entity, after
2969 replacement of character references and parameter-entity
2973 <p>The literal entity value
2974 as given in an internal entity declaration
2976 parameter-entity, and general-entity references.
2978 literal entity value.
2984 literal entity value; however,
2985 general-entity references must be left as-is, unexpanded.
2988 <eg><![CDATA[<!ENTITY % pub "Éditions Gallimard" >
2989 <!ENTITY rights "All rights reserved" >
2990 <!ENTITY book "La Peste: Albert Camus,
2992 then the replacement text for the entity "<code>book</code>" is:
2995 The general-entity reference "<code>&rights;</code>" would be expanded
3006 <p><termdef id="dt-escape" term="escape">Entity and character
3025 <eg><![CDATA[<!ENTITY lt "&#60;">
3026 <!ENTITY gt ">">
3027 <!ENTITY amp "&#38;">
3028 <!ENTITY apos "'">
3029 <!ENTITY quot """>
3033 are doubly escaped to meet the requirement that entity replacement
3051 entity and attribute-list declarations and in attribute specifications,
3071 value, attribute definition, or entity declaration. They may
3082 <div2 id="sec-doc-entity">
3083 <head>Document Entity</head>
3085 <p><termdef id="dt-docent" term="Document Entity">The <term>document
3086 entity</term> serves as the root of the entity
3090 not specify how the document entity is to be located by an XML
3091 processor; unlike other entities, the document entity has no name and might
3110 <termref def="dt-docent">document entity</termref> and any
3124 <termref def="dt-docent">document entity</termref>, including
3130 internal DTD subset and in any parameter entity that they
3132 to a parameter entity that they do <emph>not</emph> read; that is to
3141 <termref def="dt-entdecl">entity declarations</termref> or
3143 encountered after a reference to a parameter entity that is not
3144 read, since the entity may have contained overriding declarations.
3153 part of the document other than the document entity.
3159 <titleref href="wf-entdeclared">Entity Declared</titleref>,
3160 <titleref href="wf-textent">Parsed Entity</titleref>, and
3854 <head>Expansion of Entity and Character References</head>
3856 sequence of entity- and character-reference recognition and
3860 <eg><![CDATA[<!ENTITY example "<p>An ampersand (&#38;) may be escaped
3861 numerically (&#38;#38;) or with a general entity
3865 when it parses the entity declaration, and resolve them before
3867 value of the entity "<code>example</code>":
3869 numerically (&#38;) or with a general entity
3879 numerically (&) or with a general entity
3889 4 <!ENTITY % xx '%zz;'>
3890 5 <!ENTITY % zz '<!ENTITY tricky "error-prone" >' >
3898 and the parameter entity "<code>xx</code>" is stored in the symbol
3900 is not rescanned, the reference to parameter entity "<code>zz</code>"
3904 expanded immediately and the parameter entity "<code>zz</code>" is
3906 "<code><!ENTITY tricky "error-prone" ></code>",
3907 which is a well-formed entity declaration.</p></item>
3912 ("<code><!ENTITY tricky "error-prone" ></code>") is parsed.
3913 The general entity "<code>tricky</code>" has now been
3916 in line 8, the reference to the general entity "<code>tricky</code>" is
3967 entity, indicating which character encoding is in use. Before an XML
3976 entity in normal cases. Also, in many cases other sources of information
3979 depending on whether the XML entity is presented to the
3984 Because each XML entity not in UTF-8 or UTF-16 format <emph>must</emph>
4068 work if any software changes the entity's character set or encoding
4071 of the internal and external information used to label the entity.
4073 <p>The second possible case occurs when the XML entity is accompanied
4087 <item><p>If an XML entity is in a file, the Byte-Order Mark
4092 <item><p>If an XML entity is delivered with a
4098 <item><p>If an XML entity is delivered