[thelist] please answer to this question

guyin chennai sguy_chennai at yahoo.co.in
Tue Nov 25 08:06:45 CST 2003


i want to apply a template such that it will
print a text at the end of every fifth place of place1...i tried as
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="country[count(country/place1/state/main) mod 5 = 
0]">
<xsl:text> this is to be printed at the end of every fifth place of 
place1 </xsl:text>
<xsl:apply-templates/>
</xsl:template>
 
</xsl:stylesheet>
<?xml version="1.0"?>
<country>
  
  <place1>
    <state>
      <main>Musri</main>
     </state>
   </place1>
   <place1>
    <state>
      <main>paris</main>    
     </state>
   </place1>
  <place1>
    <state>
      <main>suane</main>
     </state>
   </place1>
  <place1>
    <state>
      <main>paris</main>
     </state>
   </place1>
    <place1>
    <state>
      <main>7</main>
     </state>
   </place1>
                      to print the text here
    <place1>
    <state>
      <main>Musri</main>
     </state>
   </place1>
   <place1>
    <state>
      <main>paris</main>    
     </state>
   </place1>
  <place1>
    <state>
      <main>suane</main>
     </state>
   </place1>
  <place1>
    <state>
      <main>paris</main>
     </state>
   </place1>
    <place1>
    <state>
      <main>7</main>
     </state>
   </place1>
                          to print the text here
    <place1>
    <state>
      <main>Musri</main>
     </state>
   </place1>
   <place1>
    <state>
      <main>paris</main>    
     </state>
   </place1>
  <place1>
    <state>
      <main>suane</main>
     </state>
   </place1>
  <place1>
    <state>
      <main>paris</main>
     </state>
   </place1>
    <place1>
    <state>
      <main>7</main>
     </state>
   </place1>

</country>


Yahoo! India Mobile: Ringtones, Wallpapers, Picture Messages and more.Download now.


More information about the thelist mailing list