Content deleted Content added
m robot Adding: de:Verarbeitungsanweisung |
Jerryobject (talk | contribs) m Bare URLs: 3 changed to inline references. |
||
Line 1:
A '''Processing Instruction''' ('''PI''') is a [[SGML]] and [[XML]] node type, which may occur anywhere in the document, intended to carry instructions to the application.<ref>[http://www.sagehill.net/docbookxsl/ProcessingInstructions.html Chapter 9. Customization methods: Processing instructions]</ref><ref>[http://www.w3.org/TR/NOTE-sgml-xml-971215 Comparison of SGML and XML; World Wide Web Consortium Note, 15 December 1997]</ref>
Processing instructions are exposed in the [[Document Object Model]] as Node.PROCESSING_INSTRUCTION_NODE, and they can be used in [[XPath]] and [[XQuery]] with the 'processing-instruction()' command.
== Syntax ==
An SGML processing instruction is enclosed with '<? and '>'.<ref>
A XML processing instruction is enclosed within '<?' and '?>', and contains a "target" and optionally some content, which is the node value, that can not contain the sequence '?>'.<ref>{{cite book | title = The Internet encyclopedia, Volume 3 | author = Hossein Bidgoli | page = 877 | publisher = John Wiley and Sons | year = 2004 | isbn = 0471222038
<source lang="xml"><?PITarget PIContent?></source>
The XML Declaration at the beginning of an XML document (shown below) is not a processing instruction, however its similar syntax has often resulted in it being referred to as a processing instruction.<ref name=
<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?></source>
Line 17:
<source lang="xml"><?xml-stylesheet type="text/css" href="style.css"?></source>
Another use is the [[
<source lang="php"><?php echo $a; ?></source>
|