Processing Instruction: Difference between revisions

Content deleted Content added
Addbot (talk | contribs)
m Bot: Migrating 1 interwiki links, now provided by Wikidata on d:q2513470
m Fixed references
Line 13:
 
== Examples ==
The 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.<ref>[http://www.w3.org/TR/xml-stylesheet/]</ref> It can be used for both [[XSLT]] and [[Cascading Style Sheet|CSS]] stylesheets.
<source lang="xml"><?xml-stylesheet type="text/xsl" href="style.xsl"?></source>
<source lang="xml"><?xml-stylesheet type="text/css" href="style.css"?></source>
 
Another use is the [[programming language]] [[PHP]], which can be embedded within an (X)[[HTML]] document as shown in the following example.<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="php"><?php echo $a; ?></source>
 
The [[DocBook]] XSLT stylesheets understand a number of processing instructions to override the default behaviour.<ref>[http://docbook.sourceforge.net/release/xsl/current/doc/pi/pi-fo.html]</ref>
 
A draft specification for [[Robots exclusion standard]] rules inside XML documents uses processing instructions.<ref>[http://www.atrus.org/writings/technical/robots_pi/]</ref>
 
== References ==