Processing instruction

from Wikipedia, the free encyclopedia

A processing instruction (English. Processing instruction ) or a control instruction is a language element of SGML and XML to store data that is addressed to a specific application.

A processing instruction has the following syntax in XML according to rule [16] of the XML standard:

<?Ziel Daten?>

An identifier (name) must be specified as the target for which application this processing instruction is effective. The target of the processing instruction cannot be the string XML. The data can contain any character except the combination ?>.

Pseudo- attributes can also be entered in the data , which look similar to attribute-value pairs, but are not treated as such by the parser .

The syntax in SGML is somewhat simpler according to rule [44] of the SGML standard:

 <?Daten>

Any data is >permitted here except .

function

Although SGML and XML allow the separation of content and presentation, there is an increasing need for the user to bypass this rule. You can therefore use processing instructions for these cases, e.g. B. Bringing layout information into a document ("insert a page break here"). The processing programs must be able to read and process this information.

The set program 3B2 z. B. uses processing instructions for introducing sentence commands.

Demarcation

The XML declaration (e.g. <?xml version="1.0"?>) is not a processing instruction, even if it looks exactly like that.

Individual evidence

  1. PI in: Extensible Markup Language (XML) 1.0 (Fifth Edition). Retrieved January 16, 2017 .
  2. ISO 8879: 1986-10. In: www.din.de. Retrieved January 16, 2017 .