[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Without parentnode, how to matchng first and last position of the list-item


Subject: [xsl] Without parentnode, how to matchng first and last position of the list-item
From: "V.Ramkumar" <v.ramkumar@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Nov 2008 17:00:17 +0530

Hi List,

Input,

<p class="FeatureListNumbered">1.Stand in a line in front.</p>
<p class="FeatureListNumbered">2.Which month has the most birthdays?</p>
<p class="FeatureH1">Problem Guide:</p>
<p class="FeatureListNumbered">1.Stand in a line in front.</p>
<p class="FeatureListNumbered">2.Which month has the most birthdays?</p>

Output,
<list1 type="1">
<item1><p>Stand in a line in front.</p></item1>
<item1><p>Which month has the most birthdays?</p></item1>
</list1>
<sect1><title>Problem Guide:</title>
<list1 type="1">
<item1><p>Stand in a line in front.</p></item1>
<item1><p>Which month has the most birthdays?</p></item1>
</list1>

XSL,
<xsl:template match="p[starts-with(@class, 'FeatureListNumbered')]">
<item1><p><xsl:apply-templates/></p></item1>
</xsl:template>

Please suggest how to handle this issue.

Note: In the above input no parent tag for the list.

Regards,
Ramkumar.


Current Thread
Keywords
xsl