Skip to Content
0
Former Member
Nov 14, 2006 at 09:42 AM

XSLT Processor, set_expression

144 Views

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