Buonasera,
nel forum non ho trovato nulla che mi potesse aiutare, su internet non sono riuscito a comprendere bene il perchè non funzionasse:
[php]<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="w3.org/1999/XSL/Transform">
<xsl:template match="/"><html>
xsl:apply-templates</xsl:apply-templates>
</html></xsl:template>
<xsl:template match="url">
<xsl:value-of select="loc"></xsl:value-of>
<br /><br /></xsl:template>
</xsl:stylesheet>[/php]
[php]<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<xsl:apply-templates select="//url" />
</html>
</xsl:template>
<xsl:template match="//url"> <!-- elemento artista indipendentemente dalla sua profondità -->
<xsl:apply-templates select="loc" />
<xsl:apply-templates select="lastmod" />
<br/>
</xsl:template>
<xsl:template match="loc"> <!-- elemento nome -->
<b>LASTMOD : </b>
<xsl:value-of select="text()"/>
<br/>
</xsl:template>
</xsl:stylesheet>[/php]
Come si intuisce (e si capisce dal titolo del topic) il precedente codice dovrebbe permettere al mio file XML (sitemap) di avere uno stile visibile con qualsiasi browser...io per creare questo codice ho seguito la guida di html.it solo che a me non funge..cioè l'output con safari, chrome, ecc (escluso ie) è sempre del tipo:
miki92.altervista.org/messenger/avatar-msn/avatar-usa.php2008-12-14T22:10:04+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-smiley.php2008-12-14T22:10:01+01:001.0weeklymiki92.altervista.org/messenger/avatar-msn/avatar-stelle.php2008-12-14T22:10:03+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-halloween.php2008-12-14T22:09:49+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-paesaggi.php2008-12-14T22:09:57+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-simboli.php2008-12-14T22:09:59+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-humor.php2008-12-14T22:09:50+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-loghi-msn.php2008-12-14T22:09:51+01:001.0weeklymiki92.altervista.org/messenger/avatar-msn/avatar-animali.php2008-12-14T22:09:46+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-natura.php2008-12-14T22:09:55+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-sfondi.php2008-12-14T22:09:59+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-fantasy.php2008-12-14T22:09:48+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-macchine.php2008-12-14T22:09:52+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-moto.php2008-12-14T22:09:55+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-sport.php2008-12-14T22:10:02+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/immagini-personali-per-msn.php2008-12-14T22:10:07+01:001.0weeklymiki92.altervista.org/messenger/avatar-msn/avatar-ragazze.php2008-12-14T22:09:57+01:001.0weeklymiki92.altervista.org/messenger/avatar-msn/avatar-manga.php2008-12-14T22:09:54+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-cartoni-animati.php2008-12-14T22:09:48+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-cartoni-animati/looney-toons.php2008-12-14T23:05:07+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-cartoni-animati/futurama.php2008-12-14T23:05:03+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-cartoni-animati/dragonball.php2008-12-14T23:05:03+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-cartoni-animati/south-park.php2008-12-14T23:05:09+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-cartoni-animati/hanna-e-barbera.php2008-12-14T23:05:05+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-cartoni-animati/griffin.php2008-12-14T23:05:05+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-cartoni-animati/disney.php2008-12-14T23:05:02+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-cartoni-animati/simpson.php2008-12-14T23:05:10+01:000.8weeklymiki92.altervista.org/messenger/avatar-msn/avatar-cartoni-animati/spongebob.php2008-12-14T23:05:11+01:001.0weeklymiki92.altervista.org/messenger/avatar-msn/avatar-cartoni-animati/naruto.php2008-12-14T23:05:07+01:001.0weekly
Perchè non mi funge? Ho sbagliato io a scrivere qualche cosa?
Questa è la riga di codice che utilizzo per collegare l'XSL (o XSLT) al file XML:
[php]<?xml-stylesheet type="text/xsl" href="stile.xslt" ?>[/php]
[center]»miki92.altervista.org/sitemaps/avatar.xml]ESEMPIO SITEMAP XML«[/center]