I would like to generate the complex xml by using JS step. it processed the input from the ktr stream then did some statistical caalculation, then output the XML. for instance the xml output should looks like the below: what is the practical way to do this? can JS step to have a xsd file as well in order to build the structured xml. Thanks in advance.

<current products>
</current products>
<historic products>
</historic product>