XML & XSL - xsl:pi


xsl:pi generates a processing instruction,ie. pi into the output.

Syntax

<xsl:pi name="pi-name">

Attributes

Parent Elements

Child Elements

An Example

The XSL Style Sheet

<xsl:template match="/">
	<xsl:pi name="xml">version='1.0'</xsl:pi>
	<xsl:pi name="xml-stylesheet">type="text/xsl" href="population.xsl"</xsl:pi>
	<xsl:apply-templates />
</xsl:template>

XML Equivalent

<?xml version="1.0" ?>
<?xml:stylesheet type="text/xsl" href="population.xsl" ?>