cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT help

Former Member
0 Kudos

Hi,

Could you please provide me XSLT code to convert below structure? (just adding a namespace prefix to a specific node).. I

Source structure:

<ns0:WriteProdToSB xmlns:ns0="http://tempuri.org/StokbarPlus/ProdService">

<strFilenameOrXML><prdord><ORDHDR>

<AUART>ZUC1</AUART>

<AUFNR>000025045551</AUFNR><STRDAY>20070120</STRDAY><SHTNR>1</SHTNR><ARBPL>TANK1010</ARBPL>

<ORDDTL0><MATNR>C004016</MATNR><GMENGE>21600000.000</GMENGE><GMEINS>KG</GMEINS><ORDDTL1><POSNR>0020</POSNR><IDNRK>W099330</IDNRK>

<MENGE>3672.000</MENGE><MEINS>KG</MEINS></ORDDTL1></ORDDTL0></ORDHDR></prdord></strFilenameOrXML>

<EntegrasyonTip>itOnline</m:EntegrasyonTip>

</ns0:WriteProdToSB>

Target structure:

<ns0:WriteProdToSB xmlns:ns0="http://tempuri.org/StokbarPlus/ProdService">

<ns0:strFilenameOrXML><prdord><ORDHDR>

<AUART>ZUC1</AUART>

<AUFNR>000025045551</AUFNR><STRDAY>20070120</STRDAY><SHTNR>1</SHTNR><ARBPL>TANK1010</ARBPL>

<ORDDTL0><MATNR>C004016</MATNR><GMENGE>21600000.000</GMENGE><GMEINS>KG</GMEINS><ORDDTL1><POSNR>0020</POSNR><IDNRK>W099330</IDNRK>

<MENGE>3672.000</MENGE><MEINS>KG</MEINS></ORDDTL1></ORDDTL0></ORDHDR></prdord></ns0:strFilenameOrXML>

<EntegrasyonTip>itOnline</m:EntegrasyonTip>

</ns0:WriteProdToSB>

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

i think you included namespace already.

correct me if i am wrong

Former Member
0 Kudos

Sorry for the confusion, I am using graphical mapping to get the given source structure. After that I was planning to apply an xslt mapping to add just a namespace to strFilenameOrXML tag... Can I do this with XSL ?

Shabarish_Nair
Active Contributor
0 Kudos

instead of XSLT, use a java mapping - use the String replace function to add your namespace.

Former Member
0 Kudos

Hi,

Thanks Shabarish,

I will try to do it with Java mapping..

Regards,

Answers (1)

Answers (1)

Former Member
0 Kudos

Solved with Java mapping