xsl:processing-instruction

Causes an XML processing instruction to be output.

Category: instruction
Content: sequence-constructor
Permitted parent elements: any XSLT element whose content model is sequence constructor; any literal result element

Attributes

name

{ ncname }

The name of the PI. This attribute is interpreted as an attribute value template, so it may contain string expressions within curly braces.

select?

expression

The data part of the PI may be given either by a select attribute or by an enclosed sequence constructor. If the select attribute is used and the value is a sequence, then the items in the sequence are output space-separated.

Details

The xsl:processing-instruction element can appear anywhere within an xsl:template. Note that special characters occurring within the PI text will not be escaped.

Examples

<xsl:processing-instruction name="submit-invoice">version="1.0"</xsl:processing-instruction>

Links to W3C specifications

XSLT 2.0 Specification

XSLT 3.0 Specification