An SGML processing instruction is enclosed within
An XML processing instruction is enclosed within
?>, and contains a target and optionally some content, which is the node value, that cannot contain the sequence
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.
<?xml version="1.0" encoding="UTF-8" ?>
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. 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"?>
- Chapter 9. Customization methods: Processing instructions
- Comparison of SGML and XML; World Wide Web Consortium Note, 15 December 1997
- Bryan, Martin (1997). SGML and HTML Explained. Addison Wesley Longman. ISBN 0-201-40394-3.
- Hossein Bidgoli (2004). The Internet encyclopedia, Volume 3. John Wiley and Sons. p. 877. ISBN 0-471-22203-8.
- Elliotte Rusty Harold, W. Scott Means. XML in a nutshell. p. 23. ISBN 978-0-596-00764-5.
- "Archived copy". Archived from the original on 2010-09-21. Retrieved 2010-08-18.CS1 maint: Archived copy as title (link)
- XML specification section: Processing Instructions
- XSLT FAQ: Processing Instructions, Dave Pawson
- xslt:processing-instruction, Mozilla
|This computer science article is a stub. You can help Wikipedia by expanding it.|