Content deleted Content added
Rescuing 1 sources and tagging 0 as dead. #IABot (v1.6.5) |
m →Examples: HTTP to HTTPS for SourceForge |
||
(12 intermediate revisions by 9 users not shown) | |||
Line 1:
A '''
Processing instructions are exposed in the [[Document Object Model]] as <code>Node.PROCESSING_INSTRUCTION_NODE</code>, and they can be used in [[XPath]] and [[XQuery]] with the 'processing-instruction()' command.
== 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=
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 | url = https://archive.org/details/internetencyclop00bidg_359 | url-access = limited | author = Hossein Bidgoli | page = [https://archive.org/details/internetencyclop00bidg_359/page/n911 877] | publisher = John Wiley and Sons | year = 2004 | isbn = 0-471-22203-8}}</ref>
<
The [[XHTML#XML declaration|XML Declaration]] at the beginning of an XML document (shown below) is
<
== Examples ==
The most common use of a processing instruction is to request the XML document be rendered using a [[Extensible Stylesheet Language|stylesheet]] using the 'xml-stylesheet' target, which was standardized in 1999.<ref>{{Cite web|url=http://www.w3.org/TR/xml-stylesheet/|title=Associating Style Sheets with XML documents 1.0 (Second Edition)}}</ref> It can be used for both [[XSLT]] and [[Cascading Style Sheet|CSS]] stylesheets.
<
<
The [[DocBook]] XSLT stylesheets understand a number of processing instructions to override the default behaviour.<ref>
A draft specification for [[Robots exclusion standard]] rules inside XML documents uses processing instructions.<ref>{{cite web |url=http://www.atrus.org/writings/technical/robots_pi/ |title=
== References ==
Line 26:
== External links ==
* [http://www.w3.org/TR/REC-xml/#sec-pi XML specification section: Processing Instructions]
* [https://web.archive.org/web/20160303185749/http://www.dpawson.co.uk/xsl/sect2/N6145.html XSLT FAQ: Processing Instructions], Dave Pawson
* [https://developer.mozilla.org/en/XSLT/processing-instruction xslt:processing-instruction], Mozilla
[[Category:XML]]
|