[Home] [By Thread] [By Date] [Recent Entries]
Hello Abel, thank you for the fast answer.
I am sending my XML and XSL for the list (I don't know it goes if). I wanted that each it paginates of results he/she had an ordination. But usually in my tests when I ask to order he orders everything, not just the results of the page. Regards, Carlos H. XML ----------------------------------------------------------------- <?xml version="1.0" encoding="ISO-8859-1" ?> <tribunais> <tribunal> <id>14</id> <numero>1</numero> <categoria>Tribunal Superior</categoria> <nome>Superior Tribunal de Justiga</nome> <website>www.stj.gov.br</website> </tribunal> <tribunal> <id>2</id> <numero>2</numero> <categoria>Tribunal Superior</categoria> <nome>Supremo Tribunal Federal</nome> <website>www.stf.gov.br</website> </tribunal> <tribunal> <id>16</id> <numero>3</numero> <categoria>Tribunal Superior</categoria> <nome>Tribunal de Contas da Unico</nome> <website>www.stm.gov.br</website> </tribunal> <tribunal> <id>19</id> <numero>4</numero> <categoria>Tribunal Regional do Trabalho</categoria> <nome>01* Regico - RJ</nome> <website>www.trtrio.gov.br</website> </tribunal> <tribunal> <id>20</id> <numero>5</numero> <categoria>Tribunal Regional do Trabalho</categoria> <nome>02* Regico - SP</nome> <website>www.trt02.gov.br</website> </tribunal> <tribunal> <id>18</id> <numero>6</numero> <categoria>Tribunal de Contas </categoria> <nome>Goias</nome> <website>www.tce.go.gov.br</website> </tribunal> <tribunal> <id>17</id> <numero>7</numero> <categoria>Tribunal de Contas </categoria> <nome>Bahia</nome> <website>www.tce.ba.gov.br</website> </tribunal> <tribunal> <id>15</id> <numero>8</numero> <categoria>Tribunal de Contas </categoria> <nome>Alagoas</nome> <website>www.tc.al.gov.br</website> </tribunal> </tribunais>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" extension-element-prefixes="msxsl" version="1.0"> <xsl:output method="xml" indent ="yes"/> <xsl:param name="direcao"></xsl:param> <xsl:param name="sortBy"></xsl:param> <xsl:param name="start" select="1"/> <xsl:param name="range" select="2"/> <xsl:variable name="tableData"> <xsl:apply-templates select="tribunais/tribunal[position() >=$start and position() < $start + $range]" mode="tableData"> </xsl:apply-templates> </xsl:variable> <xsl:template match="tribunais"> <table width="100%" border="1">
<tr align="center">
<td><a href="#" onclick="renderData('categoria');">categoria</a></td>
<td><a href="#" onclick="renderData('nome');">nome</a></td>
<td><a href="#" onclick="renderData('website');">website</a></td>
</tr>
<xsl:apply-templates select="msxsl:node-set($tableData)/tribunal">
<xsl:sort select="*[name()=$sortBy]" order="{$direcao}"/>
</xsl:apply-templates>
<xsl:template match="tribunal"> <tr> <td><xsl:value-of select="categoria"/></td> <td><xsl:value-of select="nome" /></td> <td><xsl:value-of select="website" /></td> </tr> </xsl:template> <xsl:template match="tribunal" mode="tableData"> <xsl:copy> <xsl:copy-of select="categoria"/> <xsl:copy-of select="nome"/> <xsl:copy-of select="website"/> </xsl:copy> </xsl:template> </xsl:stylesheet> -------------------------------------------------------------------- Abel Online escreveu: Hi Carlos,
|

Cart



