Skip to content

XSLT <xsl:processing-instruction>

How to use the XSLT <xsl:processing-instruction> element to generate processing instructions like XML stylesheets in your XSLT transformations.

XSLT <xsl:processing-instruction>

The <xsl:processing-instruction> element writes a processing instruction to the output.

Syntax

<xsl:processing-instruction name="process-name">
	<!-- Content:template -->
</xsl:processing-instruction>

Attributes

Attribute Value Required/Optional Description
name process-name Required Specifies the name of the processing instruction

Example

With the following XML code

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

we can create this tag

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