Bug #4147
closedmodule php setProperty('m',xxxx) ?
100%
Description
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
Files
Related issues
Updated by O'Neil Delpratt almost 6 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
Hi,
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.
Updated by Anne FAVEUR almost 6 years ago
Thank you for your quick response. Yes the work around works.
Updated by O'Neil Delpratt almost 6 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.
Updated by Anne FAVEUR almost 6 years ago
- File tstxslMessages.xml tstxslMessages.xml added
- File tstxslMessages.xsl tstxslMessages.xsl added
Is this what you were looking for ?
Updated by O'Neil Delpratt almost 6 years ago
It wa a note to self to add a unit test.
Thanks I will use the example you have sent.
Updated by O'Neil Delpratt about 5 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.
Updated by O'Neil Delpratt over 3 years ago
- Related to Bug #5033: missing getXslMessages() registration in zend_function_entry XsltProcessor_methods[] added
Please register to edit this issue