Bug #4147

module php setProperty('m',xxxx) ?

Added by Anne FAVEUR over 2 years ago. Updated almost 2 years ago.

Start date:
Due date:
% Done:


Estimated time:
Found in version:
Fixed in version:


The xsl I am trying to transform with, uses xsl:message. Apparently the default behavior is to push these messages to the stdout. However, since I will be using this within a soap webservice, I am pretty sure stdout output will not make my ws happy. Also I would have liked to eventually capture these to push them in a special section of my xml output. I have come to understand that "property" m would allow to associate a different message listener. However is this really possible in PHP api ? If yes how ? If no how can I prevent them to getting output to stdout ?

In advance thank you for your help

tstxslMessages.xml (130 Bytes) tstxslMessages.xml Anne FAVEUR, 2019-03-01 16:28
tstxslMessages.xsl (1.08 KB) tstxslMessages.xsl Anne FAVEUR, 2019-03-01 16:28

Related issues

Related to Saxon/C - Bug #5033: missing getXslMessages() registration in zend_function_entry XsltProcessor_methods[]Resolved2021-06-30

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>


#1 Updated by O'Neil Delpratt over 2 years ago

  • Tracker changed from Feature to Bug
  • Category set to PHP API
  • Status changed from New to In Progress
  • Assignee set to O'Neil Delpratt
  • Found in version set to 1.1.2


The setProperty("m", "xxxx") will indeed prevent your xsl:messages from outputting to your stdout.

In the C++ code we have the following method which allows the user to retrieve the xsl:messages as an array of XdmValue:

XdmValue * getXslMessages()

However this method is not currently available in the PHP API. so there is no way to get to the messages. There is no reason why this method is missing from the PHP API. Therefore I am marking this issue as a bug, which we will fix.

Thank for reporting it. The workaround of using the setProperty should at least help you for now.

#2 Updated by Anne FAVEUR over 2 years ago

Thank you for your quick response. Yes the work around works.

#3 Updated by O'Neil Delpratt over 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Your welcome.

Correction to my statement in comment #1. The getXslMessages() method returns an XdmValue object which may contain a sequence of XdmItem objects.

Bug fixed. Method getXslMessages() added in the PHP API.

Test case needed.

#4 Updated by Anne FAVEUR over 2 years ago

Is this what you were looking for ?

#5 Updated by O'Neil Delpratt over 2 years ago

It wa a note to self to add a unit test.

Thanks I will use the example you have sent.

#6 Updated by O'Neil Delpratt almost 2 years ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 1.2.0

Big fix applied in the Saxon/C 1.2.0 release.

#7 Updated by O'Neil Delpratt 3 months ago

  • Related to Bug #5033: missing getXslMessages() registration in zend_function_entry XsltProcessor_methods[] added

Please register to edit this issue

Also available in: Atom PDF