I am responsible for DataPower Probe since I joined DataPower (Compiler) team 7 years ago. Just looked at the 18 Probe related APARs from the last 4 years and saw that I did fix half of them.

Probe is a very useful debugging tool in DataPower development. I have answered many Probe related questions in developerWorks DataPower forum over the last years. Last Thursday postinghttps://www.ibm.com/developerworks/community/forums/html/topic?id=a044516f-b2ee-4684-958d-d247687586e2
was the first time I have seen request on determining whether Probe is enabled or not INSIDE a stylesheet being executed. Ted's usecase is on different amount of logging he wants to have depending on Probe is enabled or not. This may be solved alternatively via log level, but the question on how to determine Probe status in stylesheet was interesting.

The status provider which helps on determining Probe status is "Stylesheet Status" [dp:variable('var://service/system/status/StylesheetStatusSimpleIndex')]. I did execute a stylesheet via coproc2 service two times, and "Stylesheet Status" shows "coproc2.xsl" needed by coproc2 service and two temporary stylesheets (one new gets created each time a coproc2 execution happens).

As you can see there is an indication on whether a stylesheet is streamable (xslt-s-f-...) or not streamable (xslt-f-...). Then I did enable Probe for coproc2 service and did another coproc2 request:

As you can see besides the (new) temporary stylesheet "webgui:///msdebug-client.xsl" is displayed. This stylesheet is used by DataPower internally to capture all the data for each context of a Transaction with Probe enabled. And you can see that now the (same) stylesheet that was streamable before is marked as not streamable (xslt-f-...). Reason is that enabling Probe automatically converts all "PIPE" contexts to "real" contexts and disables all streaming processing.

So for stylesheets that are streamable you might just look for streamability indicator in Stylesheet cache, but the vast majority of stylesheets is NOT streamable. For these we can look for the presence of "webgui:///msdebug-client.xsl" in XML manager of the stylesheet's service.

Now I turned off Probe for coproc2 service again and did another coproc2 transaction:

As you can see the new temporary stylesheet has the streambility indicator again (xslt-s-f-...), but "webgui:///msdebug-client.xsl" is still present. Reason is that disabling Probe does not remove that stylesheet from stylesheet cache.

So in order to use "webgui:///msdebug-client.xsl" as Probe status indicator we need to do:
1) on "enable" Probe, nothing

3) In order to not get fooled by another service's Probe enabled with same XML Manager, use a XML Manager specific to each service

In order to look for presence of "webgui:///msdebug-client.xsl" in stylesheet cache of XSLT's service's XML Manager we need to determine its name. This can be easily done by "dp:variable('var://service/xmlmgr-name')". This stylesheet now does put all pieces together, and returns a simple true/false response. In addition it measures the time needed for the test, measured in milliseconds. Here you see that it takes 1msec on XI52 with Probe enabled:$ echo "<foobar/>" | coproc2 ssstat.xsl - http://firestar:2223 ; echo
1msec true
$

Changed the definition of "JSON text" so that it can be any JSON value, removing the constraint that it be an object or array.

I wanted to "see" the "real" differences between the two normative text versions of rfc4627 and rfc7159. Unfortunately diff --side-by-side -W 160 rfc4627.txt rfc7159.txt did not nicely align the diffs.

So I did split both specs into "sections" and did side-by-side diff on each section. Bash script doit concatenates all diffs resulting in diff.rfc4627-rfc7159.txt by:

./doit > diff.rfc4627-rfc7159.txt

All existing JSON features in DataPower are implemented according rfc4627.txt, you can easily verify by the hits for search string "4627" in DataPower InfoCenter.