<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=162925&amp;view=findpost&amp;p=1359440</guid>
        <pubDate>Wed, 29 Nov 2006 02:39:32 +0000</pubDate>
        <title>Четные и нечетные строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=162925&amp;view=findpost&amp;p=1359440</link>
        <description><![CDATA[MIF: Нашел ответ. Надо использовать функцию position: <div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;xsl:choose&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;xsl:when test=&quot;position() mod 2 = 0&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;...</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;/xsl:when&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;xsl:otherwise&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;...</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;/xsl:otherwise&#62;</div><div class="code_line">&#60;/xsl:choose&#62;</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script>]]></description>
        <author>MIF</author>
        <category>XML, XSL, XSLT</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=162925&amp;view=findpost&amp;p=1358309</guid>
        <pubDate>Tue, 28 Nov 2006 07:42:23 +0000</pubDate>
        <title>Четные и нечетные строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=162925&amp;view=findpost&amp;p=1358309</link>
        <description><![CDATA[silentium: Ну. например так:<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">...</div><div class="code_line">&#60;xsl:for-each select=&quot;tr&quot;&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;tr&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;xsl:if test=&quot;count(preceding-sibling::*) &nbsp;mod 2 = 0&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;xsl:attribute name=&quot;style&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;xsl:text&#62;background-color:silver&#60;/xsl:text&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;&#60;/xsl:attribute&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;/xsl:if&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;td&#62;&#60;xsl:value-of select=&quot;td&quot; /&#62;&#60;/td&#62;</div><div class="code_line">&nbsp;&nbsp;&#60;/tr&#62;</div><div class="code_line">&#60;/xsl:for-each&#62;</div><div class="code_line">...</div></ol></div></div></div></div>]]></description>
        <author>silentium</author>
        <category>XML, XSL, XSLT</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=162925&amp;view=findpost&amp;p=1358278</guid>
        <pubDate>Tue, 28 Nov 2006 07:15:44 +0000</pubDate>
        <title>Четные и нечетные строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=162925&amp;view=findpost&amp;p=1358278</link>
        <description><![CDATA[nikolas: Ченить типа такого:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&#60;xsl:choose&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;xsl:when test=&quot;count() mod 2 = 0&quot;&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;td bgcolor=&quot;#ff00ff&quot;&#62;&#60;xsl:value-of select=&quot;...&quot;/&#62;&#60;/td&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;/xsl:when&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;xsl:otherwise&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;&#60;td bgcolor=&quot;#0000ff&quot;&#62;&#60;xsl:value-of select=&quot;...&quot;/&#62;&#60;/td&#62;</div><div class="code_line">&nbsp;&nbsp; &nbsp;&#60;/xsl:otherwise&#62;</div><div class="code_line">&#60;/xsl:choose&#62;</div></ol></div></div></div></div>]]></description>
        <author>nikolas</author>
        <category>XML, XSL, XSLT</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=162925&amp;view=findpost&amp;p=1358180</guid>
        <pubDate>Tue, 28 Nov 2006 04:07:29 +0000</pubDate>
        <title>Четные и нечетные строки</title>
        <link>https://forum.sources.ru/index.php?showtopic=162925&amp;view=findpost&amp;p=1358180</link>
        <description><![CDATA[MIF: Дали задание написать xsl template. В образце четные и нечетные строки имеют разный бэкграунд. <br>Можно ли средствами XSLT определить, является ли элемент списка (&lt;xsl:for-each select= ...) четным или нечетным?<br>Добавить новый тег к xml файлу не могу.]]></description>
        <author>MIF</author>
        <category>XML, XSL, XSLT</category>
      </item>
	
      </channel>
      </rss>
	