Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi G - M > Gestione dell'informazione nei sistemi mobili e pervasivi > l'ordinamento in xsl...
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
Benny
.fedelissimo.

User info:
Registered: May 2003
Posts: 48 (0.01 al dì)
Location: Milano
Corso: Informatica
Anno: 2
Time Online: 12:49:02: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
l'ordinamento in xsl...

ciao, sono ore che sbatto la testa con il problema dell'ordinamento dei ristoranti per voto medio, ovviamente so che si sarebbe potuto fare nel db, o in php dopo aver preso i dati...ma mi pongo il problema sul farlo con xsl, ci sarebbe il costrutto xsl:sort ma ci fosse stata una volta che avesse dato risultati in una qualche brutta maniera:
vi mostro la struttura dell'xsl...

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:output method="xml" indent="yes" omit-xml-declaration="yes" media-type="application/xhtml+xml"
encoding="iso-8859-1" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"/>

<xsl:template match="Elenco_Ristoranti">
<html>
<head><title>ciao</title>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>

<xsl:template match="Record">
<xsl:apply-templates >
<xsl:sort select="nome"/>
</xsl:apply-templates>

</xsl:template>

<xsl:template match="nome">
<br/>
<b><xsl:apply-templates/></b>


</xsl:template>
</xsl:stylesheet>

se mi potete dare una zampa, senno ci rinuncio e scendo sulla catena o al db o in php...grazie

__________________
Se non credi in te stesso, chi ci crederà?

12-04-2007 18:32
Click Here to See the Profile for Benny Click here to Send Benny a Private Message Find more posts by Benny Add Benny to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
monik
Samus Aran

User info:
Registered: Oct 2004
Posts: 241 (0.03 al dì)
Location:
Corso: TICO
Anno: Dottoressa Magistrale
Time Online: 5 Days, 15:11:42 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Re: l'ordinamento in xsl...

Originally posted by Benny
ciao, sono ore che sbatto la testa con il problema dell'ordinamento dei ristoranti per voto medio, ovviamente so che si sarebbe potuto fare nel db, o in php dopo aver preso i dati...ma mi pongo il problema sul farlo con xsl, ci sarebbe il costrutto xsl:sort ma ci fosse stata una volta che avesse dato risultati in una qualche brutta maniera:
vi mostro la struttura dell'xsl...



hai provato ad inserire il sort all'interno di un for?

io ho fatto così e mi funziona benissimo...

<xsl:for-each select="smart_r/ristorante[not(nome = preceding-sibling::ristorante/nome)]">
<xsl:sort select="votoMed"/>
.

__________________
"Think Different!"

12-04-2007 20:49
Click Here to See the Profile for monik Click Here to See the Blog of monik Click here to Send monik a Private Message Find more posts by monik Add monik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Benny
.fedelissimo.

User info:
Registered: May 2003
Posts: 48 (0.01 al dì)
Location: Milano
Corso: Informatica
Anno: 2
Time Online: 12:49:02: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

si si grazie avevo risolto seguendo precisamente l'esempio delle lezioni, ma con il metodo ricorsivo non mi veniva proprio...

__________________
Se non credi in te stesso, chi ci crederà?

15-04-2007 16:58
Click Here to See the Profile for Benny Click here to Send Benny a Private Message Find more posts by Benny Add Benny to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 17:59.    Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.030 seconds (76.50% PHP - 23.50% MySQL) con 29 query.