| advertise add site services publishers database health videos | ![]() | about toolbar stats live show health store more stuff JOIN/LOGIN |
CHS Affiliated Covered Entities carolinas.org | Lipoid pneumonia: An uncommon entity Khilnani GC, Hadda V - Indian J Med indianjmedsci.org | Billing Compliance - Dealing with Excluded or Convicted Persons or Entitie... pathcuric1.swmed.edu |
In the Standard Generalized Markup Language (SGML), an entity is a primitive data type, which associates a string with either a unique alias (such as a user-specified name) or an SGML reserved word (such as
[edit] Types of entitiesEntities are classified as general or parameter:
Entities are also further classified as parsed or unparsed:
[edit] Internal and external entitiesAn internal entity has a value that is either a literal string, or a parsed string comprising markup and entities defined in the same document (such as a Document Type Declaration or subdocument). In contrast, an external entity has a declaration that invokes an external document, thereby necessitating the intervention of an entity manager to resolve the external document reference. [edit] System entitiesA system entity invokes the optional [edit] SGML document entityWhen an external entity references a complete SGML document, it is known in the calling document as an SGML document entity. An SGML document is a text document with SGML markup defined in an SGML prolog (i.e., the DTD and subdocuments). A complete SGML document comprises not only the document instance itself, but also the prolog and, optionally, the SGML declaration (which defines the document's markup syntax and declares the character encoding).[1] [edit] Syntax
An entity is defined via an entity declaration in a document's DTD. For example: <!ENTITY greeting1 "Hello world"> <!ENTITY greeting2 SYSTEM "file:///hello.txt"> <!ENTITY % greeting3 "¡Hola!"> <!ENTITY greeting4 "%greeting3; means Hello!"> This DTD markup declares the following:
Names for entities must follow the rules for SGML names, and there are limitations on where entities can be referenced. Parameter entities are referenced by placing the entity name between " The general entities from the example above might be referenced in a document as follows: <content> <info>'&greeting1;' is a common test string.</info> <info>The content of hello.txt is: &greeting2;</info> <info>In Spanish, &greeting4;</info> </content> When parsed, this document would be reported to the downstream application the same as if it has been written as follows, assuming the hello.txt file contains the text "Salutations": <content> <info>'Hello world' is a common test string.</info> <info>The content of hello.txt is: Salutations</info> <info>In Spanish, ¡Hola! means Hello!</info> </content> A reference to an undeclared entity is an error unless a default entity has been defined. For example: <!ENTITY DEFAULT "This entity is not defined"> Additional markup constructs and processor options may affect whether and how entities are processed. For example, a processor may optionally ignore external entities. [edit] Character entities
Main article: Character entity reference Standard entity sets for SGML and some of its derivatives have been developed as mnemonic 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 Universal Character Set. Although any character can be referenced using a numeric character reference, a character entity reference allows characters to be referenced by name instead of code point. HTML 4, for example, has 252 built-in character entities that don't have to be explicitly declared. XML has five. XHTML has the same five as XML, but if its DTDs are explicitly used, then it has 253 (' being the extra entity). [edit] See also[edit] Notes[edit] References
[edit] External links |
| ↑ top of page ↑ | about thumbshots |