xsl-list
[Top] [All Lists]

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

2008-11-12 06:29:27
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.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>