processing-instruction_1-input.xml
<?xml version="1.0"?>
<products>
<product
id="p1" price="3250"/>
</products>
processing-instruction_1-stylesheet.xsl
<?xml version="1.0"?>
<xsl:stylesheet
version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
indent="yes"/>
<xsl:template
match="/">
<xsl:processing-instruction
name="xml-stylesheet"> type="text/xsl" href="xml2xhtml-1.xsl</xsl:processing-instruction>
<xsl:copy-of
select="products"/>
</xsl:template>
</xsl:stylesheet>
processing-instruction_1-output.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="xml2xhtml-1.xsl?>
<products>
<product
id="p1" price="3250"/>
</products>
Many processing-instructions make use of pseudo-attributes but the content of a processing- instruction just have to be a string.
Updated 2009-03-19