<oops>this was really posted before the "passthru" posting, but had problems to be viewed in Chrome browser.

This posting still traps Chrome browsers (not Safari) in an endless loop -- will try to fix that tomorrow.In trying to fix the Chrome issue I lost the original posting :-(Luckily I found this saved draft which is complete, but probably misses some last minute corrections of the original posting.</oops>

As can be easily seen by the <sup> tag the output is HTML and intended to be viewed in a browser.

2) in Web browsers

The above shown stylesheet output is displayed in web browsers like below (Firefox and Chrome):

There are three methods on how xml-stylesheet can be used for web browsers.
While all three methods are fine for Firefox (FF), Chrome, Safari and Opera browsers, "embedded stylesheets"
do not work in Internet Explorer (IE) browsers although the XSLT 1.0 spec requires this:http://www.w3.org/TR/xslt#section-Embedding-Stylesheets
(FF, Chrome, IE, Safari and Opera are the big5 browsers have usage of more than 90%)

I developed solution "[xsl] support of stylesheet embedding for ALL browser" posted on XSL-list:

The XML data is embeeded in a stylesheet.The xml-stylesheet processing instruction just refrences the whole file, and Valery found that href="#" is the easiest way to do so.In addition he found that web browsers do special processing for suffix "*.xsl" and he used "*.xml" suffix because of that.

What I prefer here is the suffix "*.xsl.xml" for indicating that what we have is a stylesheet.

He made use of a method posted by Jeni Tennison back in 2002 for encapsulating XML data in a stylesheet by a "data:data" section:

Section d) coproc0 service below describes in detail how you can setup a service for executing xml-stylesheet (for sections a) and c) ).The examples used in this chapter are different and more DataPower specific.

a) external stylesheet

Of course stylesheets on the box can be referenced, for demo.PI.0a.xml just the identity transform from store:/// is used:

d) coproc0 service

As described above we just need a Transform (Using Processing Instruction)
action to make xml-stylesheet processing-instruction work.

Find the details of setting up this service in screenshot below.

A default transform needs to be specified in case the XML input does not contain a xml-stylesheet processing instruction.I use "store://soaperror.xsl" below in order to be notified when input misses xml-stylesheet processing instruction.

e) security considerations

Both, coproc2 and coproc0 service, are intended for use in development, not in production.

But Transform (Using Processing Instruction)
action can beuseful as non-first action to provide similar functionality to a conditional action.

Using xsl:processing-instrucion you can output xml-stylesheet processing instruction which will be executed by a following xformpi action:

As in the previous solution request type has to be Non-XML.This requires a binary transform action to make INPUT context available for any further processing.

The trick I want to show here is the use of stylesheet binary-passthru.xsl:

It does not do much, just copies the (Non-XML) input to its output context.

And this is how we can make XML input passed to this (Non-XML) service available to a "normal" stylesheet for precessing.

Just have a "Transform Binary" actions as 1st action after match, with input comtext "INPUT" and output context "input".Whenever context "INPUT" needs to be used in further actions, use context "input" instead.And if there is no final results actions, add one.

Finally have the final results action have "INPUT" as its input context (yes, that is the "unmodified" input).That's all.

I used normal transform action with stylesheet "store:///identity.xsl", input context "input" and output context "NULL" in the export attached.What does that do, and why output to "NULL"?

The output is not really needed, therefore NULL as output context.store:///identity.xsl is good enough to do XML parsing, so any Non-XML input will fail here.In additioon the XML Threat protection configured in the XML Manager happens!

In the attached config export I use XML Manager "71byte" just for demo purposes, which restricts "XML Bytes Scanned" to 71.