Following is my xml which is generated by 3rd party, i was trying to render this xml via my xsl but problem is <param/> tag when i going to define in xpath like
I want to read the <label> which resides in <sub-category> for that purpose i am using xpath but i didn't get any result.
I believe that the problem is happen due to <params/> i do not know how to add this <params/> tag into my xsl
XML:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<dynamic-data version="2.3" serial-number="201110192" name="index" xmlns="http://services.pangora.com/livexml">
<params>
<param name="poe">4</param>
</params>
<sub-categories-module>
<params/>
<sub-categories n="11">
<sub-category n="5" total="5" nr-of-products="4132" nr-of-offers="177303" parent-cid="0" cid="52124">
<label>Audio, Video & TV</label>
<category nr-of-products="779" nr-of-offers="2094" parent-cid="61207" cid="47165">
<label>LCD TVs</label>
</category>
<category nr-of-products="289" nr-of-offers="2790" parent-cid="61122" cid="47091">
<label>MP3 Players & Media Players</label>
</category>
<category nr-of-products="284" nr-of-offers="3234" parent-cid="61161" cid="47124">
<label>Navigation Systems</label>
</category>
<category nr-of-products="321" nr-of-offers="3466" parent-cid="61207" cid="47163">
<label>Projectors</label>
</category>
<category nr-of-products="253" nr-of-offers="7800" parent-cid="61214" cid="47154">
<label>Hifi & TV Speakers</label>
</category>
</sub-category>
</sub-categories>
</sub-categories-module>
</dynamic-data>
XSL:
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="yes"/>
<xsl:template match="/">
<xsl:apply-templates select="dynamic-data/sub-categories-module/sub-categories/sub-category" />
</xsl:template>
<xsl:template match="dynamic-data/sub-categories-module/sub-categories/sub-category">
<strong><xsl:value-of select="label" /></strong>
</xsl:template>
</xsl:stylesheet>