How to write xsl template for such code?




<para><place>Cape Town</place> Some 150 penguins unaffected by the oil spill began their long swim from Port Elizabeth in the Eastern Cape back to their breeding habitat at Robben Island near Cape Town on Wednesday.</para>


<xsl:template match="company">
<xsl:value-of select="text()"/>
</xsl:template>


<xsl:for-each select="para">
<xsl:value-of select="text()"/>
<xsl:if test="place">
<xsl:apply-templates select="place" />
</xsl:if>
</xsl:for-each>


Hi I've been written .xsl file to .xml and I got stack. When I run this code I see only code inside place element and the rest of the text is being ignored. Could you give me some tips, please?


No comments:

Post a Comment