Knowledge (XXG)

SGML entity

Source 📝

526: 200: 182:. An SGML document is a text document with SGML markup defined in an SGML prologue (i.e., the DTD and subdocuments). A complete SGML document comprises not only the document instance itself, but also the prologue and, optionally, the SGML declaration (which defines the document's markup syntax and declares the 101:
entity contains any kind of data, and a reference to it will result in the application's merely being notified of the entity's presence; the content of the entity will not be parsed, even if it is text. An unparsed entity can only be
596:
devices, to ease document authoring when there is a need to use characters that are not easily typed or that are not widely supported by legacy character encodings. Each such entity consists of just one character from the
512:
Additional markup constructs and processor options may affect whether and how entities are processed. For example, a processor may optionally ignore external entities.
651: 94:
entity contains text, which will be incorporated into the document and parsed if the entity is referenced. A parameter entity can only be a parsed entity.
17: 451:
When parsed, this document would be reported to the downstream application the same as if it has been written as follows, assuming the
43:). Entities are foundational to the organizational structure and definition of SGML documents. The SGML specification defines numerous 51:, SGML tags, and/or references to previously defined entities. Certain entity types may also invoke external documents. Entities are 573: 247: 551: 225: 128: 676: 547: 221: 147: 602: 349: 702: 536: 404:". Unparsed entities are referenced by placing the entity name in the value of an attribute declared as type ENTITY. 210: 656: 606: 587: 116: 555: 540: 229: 214: 737: 646: 120: 32: 265: 79: 150:, which allows SGML parsers to process an entity's string referent as a resource identifier, and an optional 47:, which are distinguished by keyword qualifiers and context. An entity string value may variously consist of 641: 598: 493:
A reference to an undeclared entity is an error unless a default entity has been defined. For example:
178:
When an external entity references a complete SGML document, it is known in the calling document as an
132: 52: 119:
string, or a parsed string comprising markup and entities defined in the same document (such as a
183: 143:
An entity declaration may have a literal value, or may have some combination of an optional
407:
The general entities from the example above might be referenced in a document as follows:
154:
identifier, which identifies the entity independent of any particular representation. In
25: 620:
has 252 built-in character entities that do not need to be explicitly declared, while
742: 731: 36: 684: 592:
Standard entity sets for SGML and some of its derivatives have been developed as
722: 628:
has the same five as XML, but if its DTDs are explicitly used, then it has 253 (
525: 199: 131:
that invokes an external document, thereby necessitating the intervention of an
610: 48: 396:. Parsed general entities are referenced by placing the entity name between " 382: 28: 593: 348:
exists and consists of the text found in the resource identified by the
35:
with either a unique alias (such as a user-specified name) or an SGML
388:
Parameter entities are referenced by placing the entity name between
625: 385:, and there are limitations on where entities can be referenced. 617: 159: 621: 519: 193: 155: 86:
Entities are also further classified as parsed or unparsed:
71:
entity can only be referenced within the document content.
609:
allows characters to be referenced by name instead of
601:. Although any character can be referenced using a 63:Entities are classified as general or parameter: 652:List of XML and HTML character entity references 632:being the extra entity beyond those in HTML 4). 708:Goldfarb, Charles F., and Yuri Rubinsky (Ed.). 677:"Web SGML and HTML 4.0 Explained - Chapter 6" 381:Names for entities must follow the rules for 8: 135:to resolve the external document reference. 554:. Unsourced material may be challenged and 228:. Unsourced material may be challenged and 574:Learn how and when to remove this message 248:Learn how and when to remove this message 78:entity can only be referenced within the 469:'Helloworld'isacommonteststring. 329:This DTD markup declares the following: 668: 162:, an entity declaration may not have a 504:"This entity is not defined" 7: 552:adding citations to reliable sources 321:"%greeting3; means Hello!" 226:adding citations to reliable sources 18:Standard Generalized Markup Language 476:Thecontentofhello.txtis:Salutations 358:An internal parameter entity named 373:exists and consists of the string 362:exists and consists of the string 337:exists and consists of the string 14: 369:An internal general entity named 344:An external general entity named 333:An internal general entity named 123:or subdocument). In contrast, an 712:. Oxford University Press, 1991. 524: 198: 107:Internal and external entities 1: 294:"file:///hello.txt" 115:has a value that is either a 701:Goldfarb, Charles F. (Ed.). 260:An entity is defined via an 603:numeric character reference 483:InSpanish,¡Hola!meansHello! 759: 703:ISO 8879 Review: WG8 N1855 657:XML external entity attack 607:character entity reference 588:Character entity reference 585: 723:Entity Management in SGML 705:. WG8 and Liaisons, 1996. 647:Object (computer science) 421:'isacommonteststring. 121:Document Type Declaration 495: 461: 428:Thecontentofhello.txtis: 409: 270: 266:document type definition 80:document type definition 642:Declarative programming 599:Universal Character Set 455:file contains the text 279:"Hello world" 166:identifier without a 31:, which associates a 681:www.is-thought.co.uk 548:improve this section 268:(DTD). For example: 222:improve this section 180:SGML document entity 174:SGML document entity 375:¡Hola! means Hello! 53:called by reference 516:Character entities 309:"¡Hola!" 262:entity declaration 184:character encoding 710:The SGML Handbook 584: 583: 576: 353:file:///hello.txt 258: 257: 250: 750: 738:Markup languages 689: 688: 683:. Archived from 673: 631: 579: 572: 568: 565: 559: 528: 520: 508: 505: 502: 499: 489: 488:</content> 486: 482: 479: 475: 472: 468: 465: 458: 454: 447: 446:</content> 444: 441: 437: 434: 431: 427: 424: 420: 416: 413: 403: 399: 395: 391: 376: 372: 365: 361: 354: 347: 340: 336: 325: 322: 319: 316: 313: 310: 307: 304: 301: 298: 295: 292: 289: 286: 283: 280: 277: 274: 264:in a document's 253: 246: 242: 239: 233: 202: 194: 169: 165: 153: 146: 42: 758: 757: 753: 752: 751: 749: 748: 747: 728: 727: 719: 698: 693: 692: 675: 674: 670: 665: 638: 629: 590: 580: 569: 563: 560: 545: 529: 518: 510: 509: 506: 503: 500: 497: 491: 490: 487: 484: 480: 477: 473: 470: 466: 464:<content> 463: 456: 452: 449: 448: 445: 442: 440:&greeting4; 439: 435: 432: 430:&greeting2; 429: 425: 422: 419:&greeting1; 418: 414: 412:<content> 411: 401: 397: 393: 389: 374: 370: 363: 359: 352: 345: 338: 334: 327: 326: 323: 320: 317: 314: 311: 308: 305: 302: 299: 296: 293: 290: 287: 284: 281: 278: 275: 272: 254: 243: 237: 234: 219: 203: 192: 176: 167: 163: 151: 144: 141: 139:System entities 125:external entity 113:internal entity 109: 61: 40: 12: 11: 5: 756: 754: 746: 745: 740: 730: 729: 726: 725: 718: 717:External links 715: 714: 713: 706: 697: 694: 691: 690: 687:on 2009-02-05. 667: 666: 664: 661: 660: 659: 654: 649: 644: 637: 634: 586:Main article: 582: 581: 532: 530: 523: 517: 514: 496: 462: 410: 379: 378: 367: 356: 342: 271: 256: 255: 206: 204: 197: 191: 188: 175: 172: 158:, a subset of 140: 137: 133:entity manager 108: 105: 104: 103: 95: 84: 83: 72: 60: 57: 13: 10: 9: 6: 4: 3: 2: 755: 744: 741: 739: 736: 735: 733: 724: 721: 720: 716: 711: 707: 704: 700: 699: 695: 686: 682: 678: 672: 669: 662: 658: 655: 653: 650: 648: 645: 643: 640: 639: 635: 633: 627: 623: 619: 616:For example, 614: 612: 608: 604: 600: 595: 589: 578: 575: 567: 557: 553: 549: 543: 542: 538: 533:This section 531: 527: 522: 521: 515: 513: 494: 485:</info> 478:</info> 471:</info> 460: 443:</info> 433:</info> 423:</info> 408: 405: 386: 384: 368: 357: 351: 343: 332: 331: 330: 269: 267: 263: 252: 249: 241: 231: 227: 223: 217: 216: 212: 207:This section 205: 201: 196: 195: 189: 187: 185: 181: 173: 171: 161: 157: 149: 138: 136: 134: 130: 126: 122: 118: 114: 106: 100: 96: 93: 89: 88: 87: 81: 77: 73: 70: 66: 65: 64: 58: 56: 54: 50: 46: 38: 37:reserved word 34: 30: 27: 23: 19: 709: 685:the original 680: 671: 615: 591: 570: 561: 546:Please help 534: 511: 492: 481:<info> 474:<info> 467:<info> 450: 436:<info> 426:<info> 415:<info> 406: 387: 380: 328: 261: 259: 244: 235: 220:Please help 208: 179: 177: 170:identifier. 142: 124: 112: 110: 98: 91: 85: 75: 68: 62: 59:Entity types 45:entity types 44: 21: 15: 498:<!ENTITY 457:Salutations 339:Hello world 315:<!ENTITY 300:<!ENTITY 285:<!ENTITY 273:<!ENTITY 129:declaration 20:(SGML), an 732:Categories 696:References 630:&apos; 624:has five. 611:code point 564:April 2009 438:InSpanish, 383:SGML names 238:April 2009 148:identifier 49:plain text 535:does not 453:hello.txt 371:greeting4 360:greeting3 346:greeting2 335:greeting1 318:greeting4 306:greeting3 288:greeting2 276:greeting1 209:does not 102:external. 76:parameter 39:(such as 29:data type 26:primitive 636:See also 594:mnemonic 501:#DEFAULT 99:unparsed 41:#DEFAULT 556:removed 541:sources 400:" and " 230:removed 215:sources 117:literal 69:general 16:In the 618:HTML 4 364:¡Hola! 291:SYSTEM 190:Syntax 168:SYSTEM 164:PUBLIC 152:PUBLIC 145:SYSTEM 127:has a 92:parsed 82:(DTD). 33:string 22:entity 663:Notes 626:XHTML 417:' 398:& 24:is a 743:SGML 605:, a 539:any 537:cite 507:> 392:and 324:> 312:> 297:> 282:> 213:any 211:cite 160:SGML 622:XML 550:by 350:URI 224:by 186:). 156:XML 111:An 97:An 734:: 679:. 613:. 459:: 90:A 74:A 67:A 55:. 577:) 571:( 566:) 562:( 558:. 544:. 402:; 394:; 390:% 377:. 366:. 355:. 341:. 303:% 251:) 245:( 240:) 236:( 232:. 218:.

Index

Standard Generalized Markup Language
primitive
data type
string
reserved word
plain text
called by reference
document type definition
literal
Document Type Declaration
declaration
entity manager
identifier
XML
SGML
character encoding

cite
sources
improve this section
adding citations to reliable sources
removed
Learn how and when to remove this message
document type definition
URI
SGML names

cite
sources
improve this section

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.