« ADF Faces 10.1.3: Dynamic Menus w/ ADF Regions | Main | OC4J: Configuring DataSources »

Creating XML Processing Instructions with XSLT

In a joint effort Clemens Utschig-Utschig and I did a small exercise to answer a question from one of our Oracle Partners:

How to create an XML processing instruction like <?Foo?> after the normal XML preamble <?xml?> but before the document root with XSLT?

Answer:
Before any other XSLT template have this one:
<xsl:template match="/">

 <xsl:processing-instruction name="Foo"/>

 <xsl:apply-templates />

</xsl:template>




This will generate something like this:
<?xml version="1.0" encoding="UTF-8"?><?Foo?>

Comments (3)

Did you try to use the XMLPI SQL function or had it to be a XSLT specific solution?

Olaf Heimburger:

It must be a XSLT specific solution. Using XML APIs is always a good option, of course.

...it depends...

;-)

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

About This Entry

This page contains a single entry from the blog posted on April 26, 2007 12:08 AM.

The previous post in this blog was ADF Faces 10.1.3: Dynamic Menus w/ ADF Regions.

The next post in this blog is OC4J: Configuring DataSources.

Many more can be found on the main index page or by looking through the archives.

Top Tags

Powered by
Movable Type and Oracle