Processing Instruction: Difference between revisions

Content deleted Content added
Doncram (talk | contribs)
m Added emphasis. Improved formatting.
Line 4:
 
== Syntax ==
An SGML processing instruction is enclosed within '<code><?</code> and '<code>></code>'.<ref>{{cite book |title= SGML and HTML Explained |last= Bryan |first= Martin |publisher= Addison Wesley Longman |year= 1997 |url= http://www.is-thought.co.uk/book/sgml-8.htm#PI |isbn= 0-201-40394-3}}</ref>
 
An XML processing instruction is enclosed within '<code><?'</code> and '<code>?>'</code>, and contains a ''target'' and optionally some content, which is the node value, that cannot contain the sequence '<code>?>'</code>.<ref>{{cite book | title = The Internet encyclopedia, Volume 3 | author = Hossein Bidgoli | page = 877 | publisher = John Wiley and Sons | year = 2004 | isbn = 0-471-22203-8}}</ref>
<source lang="xml"><?PITarget PIContent?></source>
 
The [[XHTML#XML declaration|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="nutshell">{{cite book | title = XML in a nutshell | author = Elliotte Rusty Harold, W. Scott Means | isbn = 978-0-596-00764-5 | page = 23 }}</ref>
<source lang="xml"><?xml version="1.0" encoding="UTF-8" ?></source>