I am trying to populate data from xml to xslt n unable to do that since I do not have idea about xslt and xpath.Even though I tried my level best ( used concat() method ) but could not. could you please help me with below mapping? :----
Xml:----(a piece of code)
<supportingProductFeatures>
<type>NH</type>
<version>2.0.0</version>
<capacityAvailability>
<featureType>TY1</featureType>
<capacity>2</capacity>
<unitOfMeasure>Mbps</unitOfMeasure>
<highSpeedNotLessThan>true</highSpeedNotLessThan>
</capacityAvailability>
</supportingProductFeatures>
trying to achieve below one:--
<DescribedBy>
<value>Yes</value>
<Characteristic>
<name>NH TY1 High Speed Tiers (greater or equal to 2Mbps)</name>
<type>abcd</type>
</Characteristic>
</DescribedBy>
condition to map:---
if ((highSpeedNotLessThan!=null))
{
if(highSpeedNotLessThan.equals("true"){
1) set value=yes
2) set name=concat(type +" "+featureType+" "+"High Speed Tiers (greater or equal to
"+capacity+unitOfMeasure+")"
3) set type="abcd"
}
else if(highSpeedNotLessThan.equals("false"){
1)set value=no
2) set name=concat(type +" "+featureType+" "+"High Speed Tiers (greater or equal to
"+capacity+unitOfMeasure+")"
3) set type="abcd"
}
}
this is what i have tried so far:--
<DescribedBy>
<xsl:if test="/supportingProductFeatures/capacityAvailability/highSpeedNotLessThan='true'">
<value>yes</value>
</xsl:if>
<xsl:if test="/supportingProductFeatures/capacityAvailability/highSpeedNotLessThan='false'">
<value>No</value>
</xsl:if>
<Characteristic>
<name>
<xsl:value-of select="concat(supportingProductFeatures/type,' ',supportingProductFeatures/capacityAvailability/featureType,' ','High Speed Tiers (greater or equal to ',supportingProductFeatures/capacityAvailability/capacity,supportingProductFeatures/capacityAvailability/unitOfMeasure)" />
</name>
<type>abcd</type>
</Characteristic>
</DescribedBy>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…