tag omission
   HOME

TheInfoList



OR:

Tag omission is an optional feature to minimize an SGML document. Whenever a tag can be implicitly anticipated by the parser from the structure of the document, the tag can be omitted.Web SGML and HTML 4.0 Explained - Chapter 9
/ref> The tag omission feature can be generally enabled or disabled in the SGML Declaration. The Document Type Definition is used to enable or disable the tag for a specific tag. Tag omission is one of the main features of SGML which was removed from
XML Extensible Markup Language (XML) is a markup language and file format for storing, transmitting, and reconstructing arbitrary data. It defines a set of rules for encoding documents in a format that is both human-readable and machine-readable ...
to simplify parsing.


Example

In this example the <document> tag has a distinct order of the tags. The information that <title> needs to come first and is followed by <p> can be used to omit the title start and end tag. Furthermore, the end tag of <p> can also be omitted, because it will be delimited by the next <p> tag or the document end. In this DTD specification, the behavior of the tag omission feature is specified for each element by the two characters following the element name. The values can be - or O for disabling and enabling the features. The first character specifies the behavior of the start tag and the second the behavior of the end tag. A valid document not using tag omission: Tag Omission

first paragraph

second paragraph

third paragraph

A valid document simplified by using tag omission: Tag Omission

first paragraph

second paragraph

third paragraph


References

{{DEFAULTSORT:Tag Omission Markup language comparisons XML