|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: doubt
> 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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








