2015 Jul 20 11:07 PM
Hi Experts,
I have been searching through the forum but could not find any answer to my issue.
I'm using simple transformation and using a XString variable as result I get the <?xml version="1.0" encoding="UTF-8"?> but I still need the .. standalone="yes"?>
I have seen some ways to do it using XSLT Transformation, but as I am using a simple one, tried but it does not work.
Thanks in advance.
Hi Experts,
I have been searching through the forum but could not find any answer to my issue.
I'm using simple transformation and using a XString variable as result I get the <?xml version="1.0" encoding="UTF-8"?> but I still need the .. standalone="yes"?>
I have seen some ways to do it using XSLT Transformation, but as I am using a simple one, tried but it does not work.
Thanks in advance.
2015 Jul 20 11:14 PM
2015 Jul 20 11:28 PM
2016 May 19 12:34 PM
2016 May 19 2:04 PM
The easiest is to copy the ID transformation, add <xsl:output standalone = "yes"/> (to put right after xsl:transform start tag) and call this transformation for transforming the xml result obtained from your simple transformation.
2016 May 19 2:36 PM
You mean, add like this?
<?sap.transform simple?>
<?xml standalone="yes"?> // here? unfortunately, it's not works
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="TEXT"/>
<tt:template>
<text>
<tt:attribute name="attr" value-ref="TEXT" />
<tt:value ref="TEXT"/>
</text>
</tt:template>
</tt:transform>
2016 May 19 3:16 PM
It's not what I said.
1) Duplicate transformation ID into transformation ZID_STANDALONE_YES, and add <xsl:output standalone = "yes"/> (to put right after xsl:transform start tag)
2) After CALL TRANSFORMATION zsimpletransfo SOURCE ... RESULT XML xstring, add a line : CALL TRANSFORMATION zid_standalone_yes SOURCE XML xstring RESULT XML xstring.