Project

Profile

Help

Bug #4147

module php setProperty('m',xxxx) ?

Added by Anne FAVEUR over 1 year ago. Updated 10 months 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

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

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

History

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

#2 Updated by Anne FAVEUR over 1 year ago

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

#3 Updated by O'Neil Delpratt over 1 year 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 1 year ago

Is this what you were looking for ?

#5 Updated by O'Neil Delpratt over 1 year 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 10 months 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.

Please register to edit this issue

Also available in: Atom PDF