Hi,
Your explanation is a bit difficult to follow. A more precise example of
wanted and received output would help. Though I spotted one suspicious
test, but on the other hand that could be the result of retyping the
code into your message.
This:
<xsl:when test="parent:step1|step2|step3"></xsl:when>
Should probably be:
<xsl:when
test="parent::step1|parent::step2|parent::step3"></xsl:when>
Kind regards,
Geert
Drs. G.P.H. Josten
Consultant
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van
Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit
bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit
bericht kunnen geen rechten worden ontleend.
Van: Meenakshi Nanjundeswar [mailto:meenananju(_at_)hotmail(_dot_)com]
Verzonden: donderdag 19 oktober 2006 22:36
Aan: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Onderwerp: [xsl] Help with mode
Hi:
I can best explain my problem with an example.
XML file:
<step1>
<note>
<para>Some text</para>
</note>
<text><para>Txt</para></text>
<note><para>Second note</para></note>
<step2>
<note>
<para>Some other text</para>
</note>
<text>para>Txt2</para></text>
</step2>
</step1>
Now, step 1 is an element which is formatted with numbering
1. step 2 is formatted with numbering A. There can be 7
levels of steps like this.
The issue I am facing is when I have a note element directly
as a child of
step1 , step2 ....step7, The number and the NOTE overlap like.
So instead of:
NOTE: Some text
1.Txt
NOTE:Second note
NOTE:Some Other text
2.Txt2
the number 1. and N of NOTE overlap. To overcome this, under
template for
step1,step2..step7 I checked said:
<xsl:template match="step1">
<xsl:if test="child::note><xsl:apply-templates select="note"
mode="step1"/> <code for....formatting for step1...> </xsl:template>
<xsl:template match="step2">
<xsl:if test="child::note><xsl:apply-templates select="note"
mode="step1"/> <code for....formatting for step1...> </xsl:template>
Under the template for "note",
<xsl:template match="note">
<xsl:choose>
<xsl:when test="parent:step1|step2|step3"></xsl:when>
<xsl:otherwise><!-- formatting for note
element--></xsl:otherwise> </xsl:choose> </xsl:template>
So, if the parent element is step1 , step 2,...step7 then
dont do anything, otherwise format it.
This code is not working for step 2 onwards. the number and
letter 'N' of note are overlapping.
What is wrong with this code?
Thank you for your help.
_________________________________________________________________
Stay in touch with old friends and meet new ones with Windows
Live Spaces
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?h
ref=http://spaces.live.com/spacesapi.aspx?>
wx_action=create&wx_url=/friends.aspx&mkt=en-us
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--