Project

Profile

Help

Bug #4147

closed

module php setProperty('m',xxxx) ?

Added by Anne FAVEUR about 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
PHP API
Start date:
2019-02-28
Due date:
% Done:

100%

Estimated time:
Found in version:
1.1.2
Fixed in version:
1.2.0
Platforms:

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

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 SaxonC - Bug #5033: missing getXslMessages() registration in zend_function_entry XsltProcessor_methods[]ClosedO'Neil Delpratt2021-06-30

Actions
Actions #1

Updated by O'Neil Delpratt about 5 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.

Actions #2

Updated by Anne FAVEUR about 5 years ago

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

Actions #3

Updated by O'Neil Delpratt about 5 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.

Actions #4

Updated by Anne FAVEUR about 5 years ago

Is this what you were looking for ?

Actions #5

Updated by O'Neil Delpratt about 5 years ago

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

Thanks I will use the example you have sent.

Actions #6

Updated by O'Neil Delpratt over 4 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.

Actions #7

Updated by O'Neil Delpratt almost 3 years 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