Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

XSLT Processor, set_expression

Former Member
0 Likes
446

hello,

in the last few days i´ve posted several questions about xslt, xslt processor, ixml etc., but nobody could give me an answer. i think all my attempts to solve my problem gone to the wrong path.

now, this will be my last question to this topic.

is it possible to use xsl functions such like concat, count, etc. with the set_expression method in class cl_xslt_processor (see below).

it tested it with different xpath-expression.

i guess it is not possible. only logical path expression seems to work. when i call method "get_nodes" the result is empty, also the result of method "output_string" and "output_stream".

okay, i see why get_nodes do not return a ixml_node_collection, but i hoped a result would be return by an other method or attribute.

i would be very happy, if someone could approve my attempts or knows a workaround.

kind regards

sebastian


  DATA: lr_xslt                  TYPE REF TO cl_xslt_processor,
            lr_node_collection TYPE REF TO if_ixml_node_collection,

  CREATE OBJECT lr_xslt.

  CALL METHOD ori_xslt->set_expression
        EXPORTING
          expression = 'concat(//Child/@attribute,''1'')'.  

  CALL METHOD lr_xslt->run
        EXPORTING
          progname = ' '
        RECEIVING
          rval     = lv_subrc.

      lr_node_collection = ori_xslt->get_nodes( ).

      lr_node_collection = "*** illegal reference ***

Message was edited by:

Has nobody an answer or estimation to my attempts?

Thanks and kind regards

S.

Sebastian Rasp

1 REPLY 1
Read only

Former Member
0 Likes
301

I come to the conclusion that it´s not possible to use any xsl-function such as concat, substring etc.