As the below source XML Value/string element value has to be replace with target element value, Could some please help me out how to create the XSL to transform from source xml into target xml .Please. Source XML:
<PricingResultsV6>
<subItems>
<SubItem>
<profiles>
<ProfileValues>
<values>
<strings>800210</strings>
<strings>THC</strings>
<strings>10.0</strings>
<strings>20.0</strings>
<strings>30.0</strings>
<strings>40.0</strings>
<strings>550.0</strings>
<strings>640.0</strings>
</values>
</ProfileValues>
</rofiles>
</SubItem>
</subItems>
</PricingResultsV6>
Target XML :
<CalculationOutput>
<PolicyNumber> 800210 </PolicyNumber>
<CommissionFactorMultiplier> THC </CommissionFactorMultiplier>
<PremiumValue>10.0</PremiumValue>
<SalesmanCommissionValue>20.0</SalesmanCommissionValue>
<ManagerCommissionValue>30.0</ManagerCommissionValue>
<GL_COR> 550.0</GL_COR>
<GL_OPO>640.0</GL_OPO>
</CalculationOutput>
You could do something basic like this...
XML Input (well-formed)
XSLT 1.0
XML Output
Actual mapping options. All of these produce the same output as above...
XSLT 1.0
XSLT 2.0
XSLT 3.0 (tested with Saxon-EE 9.4)