xsl-list
[Top] [All Lists]

Re: incrementing the index value

2005-06-09 07:32:43
Hello David,

Thanks for the solution. Its is working.

<xsl:apply-templates select=".//Box/*[(_at_)id]">
   <xsl:sort
 select="substring-before($order,name())"/>
 </xsl:apply-templates>
but here i dont want to sort. 
So, I removed this <xsl:sort> and solution is perfect.

Once again thanks for the solution.

Regards,
Arul
--- David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk> wrote:


<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
      <xsl:output method="xml" indent="yes" version="1.0"
/>

<xsl:variable name="order" select="' textbox radio
'"/>

<xsl:template match="Layout">
<taborder>
<fieldlist> 
<xsl:apply-templates select=".//Box/*[(_at_)id]">
  <xsl:sort
select="substring-before($order,name())"/>
</xsl:apply-templates>
</fieldlist>
</taborder>   
</xsl:template>

<xsl:template match="Box/*">
 <field name="{(_at_)id}" tabindex="{position()}"/>
</xsl:template>

</xsl:stylesheet>



$ saxon box.xml box.xsl
<?xml version="1.0" encoding="utf-8"?>
<taborder>
   <fieldlist>
      <field name="textbox" tabindex="1"/>
      <field name="textbox1" tabindex="2"/>
      <field name="TextBox2" tabindex="3"/>
      <field name="TextBox3" tabindex="4"/>
      <field name="radio" tabindex="5"/>
   </fieldlist>
</taborder>


________________________________________________________________________
This e-mail has been scanned for all viruses by
Star. The
service is powered by MessageLabs. For more
information on a proactive
anti-virus service working around the clock, around
the globe, visit:
http://www.star.net.uk

________________________________________________________________________


--~------------------------------------------------------------------
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>
--~--





                
__________________________________ 
Discover Yahoo! 
Find restaurants, movies, travel and more fun for the weekend. Check it out! 
http://discover.yahoo.com/weekend.html 


--~------------------------------------------------------------------
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>