I am having the xml file in this format.
<question correctid="3" Qno="370" >
<stmt1 mgif1="" mgif="" misc="" >Kepler's first law of
planetary motion is also called </stmt1>
<stmt2 mgif1="" mgif="" misc="" />
<opt mgif1="" mgif="" voiceover="" >law of periods</opt>
<opt mgif1="" mgif="" voiceover="" >law of areas</opt>
<opt mgif1="" mgif="" voiceover="" >law of orbits</opt>
<opt mgif1="" mgif="" voiceover="" >law of distances</opt>
</question>
For example, If the correct id number value is 3 the law of
orbits value
should appear in different color. so according the correct id
the color of
the option should get changed. Is it possible to do ?
Not a very useful subject line.
Yes, use logic like the following, with opt as the context node:
<xsl:if test="../@correctId = count(preceding-sibling::opt)+1">
<xsl:attribute name="colour">pink</xsl:attribute>
</xsl:if>
Michael Kay
http://www.saxonica.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>
--~--