<%@ page language="C#" masterpagefile="~/templates/Documentation.master" inherits="Page" pagetitle="xsl:processing-instruction" keywords="xsl:processing-instruction"%>

xsl:processing-instruction

Adds a processing instruction node to the result tree.

Format

<xsl:processing-instruction name = "pi_name"> 
processing_instruction  
</xsl:processing-instruction> 

Description

The XSLT processor interprets the name attribute as an attribute value template, and uses the resulting string as the target of the created processing instruction. The XSLT processor then instantiates the contents of xsl:processing-instruction to generate the remaining contents of the processing instruction.

Errors are reported under the following conditions:

Example

<xsl:processing-instruction name = "xml-stylesheet">  
  href="book.css" type="text/css" 
</xsl:processing-instruction> 

This instruction creates the following processing instruction in the result document:

<?xml-stylesheet href="book.css" type="text/css"?>