Processing InstructionA processing instruction (PI) is an SGML and XML node type, which may occur anywhere in a document, intended to carry instructions to the application.[1][2] Processing instructions are exposed in the Document Object Model as SyntaxAn SGML processing instruction is enclosed within An XML processing instruction is enclosed within <?PITarget PIContent?>
The XML Declaration at the beginning of an XML document (shown below) is another example of a processing instruction,[5] however it may not technically be considered one.[6] <?xml version="1.0" encoding="UTF-8" ?>
ExamplesThe most common use of a processing instruction is to request the XML document be rendered using a stylesheet using the 'xml-stylesheet' target, which was standardized in 1999.[7] It can be used for both XSLT and CSS stylesheets. <?xml-stylesheet type="text/xsl" href="style.xsl"?>
<?xml-stylesheet type="text/css" href="style.css"?>
The DocBook XSLT stylesheets understand a number of processing instructions to override the default behaviour.[8] A draft specification for Robots exclusion standard rules inside XML documents uses processing instructions.[9] References
External links |