Skip to content

xsl:processing-instruction

Causes an XML processing instruction to be output.

Available in XSLT 1.0 and later versions. Available in all Saxon editions.

  • 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>

Comments