|
Subject: [xsl] How to remove the extra elements thru template match From: "Thangavelu Srinivasan" <vasantry@xxxxxxxxx> Date: Thu, 2 Nov 2006 17:06:45 +0530 |
Hi All, I need help in resolving the problem for the below. I am using XSLT 1.0. Any suggestions are welcome.
<?xml version="1.0" encoding="UTF-8"?>
<aaxml>
<item name="control">
<envelope>
<try_id>Sample</try_id>
<rec_no>2006092405020001815466</rec_no>
<selector_code>2071</selector_code>
</envelope>
</item>
<item>
<story>
<rec_no>2006092405020001815466</rec_no>
<try_id>AP ONLINE</try_id>
<selector_code>2071</selector_code>
<slug>Sample</slug>
<story_number>V7193</story_number>
<requested_action>ADD</requested_action>
<headline>Sample text</headline>
<byline>s</byline>
<dateline>a</dateline>
<dateline1>b</dateline1>
<dateline2>Co</dateline2>
<timestamp>09/24/06 05:02</timestamp>
<time_zone>EDT</time_zone>
<story_text>"<p>This is a sample text.</p>"</story_paragraph>
<language>ENGLISH</language>
<anpa_cat>s</anpa_cat>
<update_timestamp>Sep 24 2006 5:04:00:000AM</update_timestamp>
<sri_id>Sample</sri_id>
</story>
<subject>
<subject_code>SELECTOR</subject_code>
<subject_value>2071</subject_value>
</subject>
</item>
</aaxml><?xml version="1.0" encoding="UTF-8" ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" encoding="utf-8" omit-xml-declaration="yes" indent="yes"/>
<xsl:template match='story'>
<rss version="2.0">
<channel>
<title><xsl:value-of select="try_id"/></title>
</item>
</channel>
</rss>
</xsl:template>I don't want to display other than story element. How to give it in the xsl in a single command for the removing the irrespective of the tags not mentioned.
Regards Srinivas
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] NAMESPACE_ERR when creati, Michael Kay | Thread | RE: [xsl] How to remove the extra e, cknell |
| RE: [xsl] NAMESPACE_ERR when creati, Michael Kay | Date | RE: [xsl] Is it possible to create , Nick Glenister |
| Month |