:bhò:

xml xsl -> svg ???

Sono giorni che cerco di risovere il seguente problema.

Ho scritto un file xml il seguente:

codice:
<?xml version="1.0" encoding="ISO-8859-1" ?> 
<?xml-stylesheet type="text/xsl" href="p.xsl"?> 
<rubrica>
  <persona>
    <nome>Mario</nome>
    <cognome>Rossi</cognome>
    <indirizzo>
      <via>via bianchi 1</via>
      <cap>00000</cap>
      <citta>Roma</citta>
    </indirizzo>
    <telefono>
      <telefono_fisso>123456</telefono_fisso>
      <telefono_cellulare>987656412</telefono_cellulare>
    </telefono>
  </persona>
</rubrica>
Ho scritto il seguente file xsl :

codice:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"
    doctype-public="-//W3C//DTD SVG 20010904//EN"
    doctype-system="http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"/>
  <xsl:template match="/">
    <svg width="100%" height="100%">
      <title>Rubrica in versione SVG</title>
      <xsl:apply-templates/>
    </svg>  
  </xsl:template>
  <xsl:template match="persona">
    <rect x="10" y="10" width="180" height="30" fill="lightblue" stroke="blue" stroke-width="2"/>
    <text x="20" y="30" font-family="times" font-width="20" fill="black">
      <xsl:value-of select="cognome"/>&#160;<xsl:value-of select="nome"/> 
    </text>
    <rect x="10" y="40" width="200" height="150" fill="white" stroke="blue" stroke-width="2"/>
    <text x="20" y="60" font-family="times" font-width="20" fill="blue">
      Via: <xsl:value-of select="./indirizzo/via"/>
    </text>
    <text x="20" y="80" font-family="times" font-width="20" fill="blue">
      CAP: <xsl:value-of select="./indirizzo/cap"/>
    </text>
    <text x="20" y="100" font-family="times" font-width="20" fill="blue">
      Citta': <xsl:value-of select="./indirizzo/citta"/>
    </text>
    <text x="20" y="120" font-family="times" font-width="20" fill="blue">
      Telefono (fisso): <xsl:value-of select="./telefono/telefono_fisso"/>
    </text>
    <text x="30" y="140" font-family="times" font-width="20" fill="blue">
      Telefono (cellulare): <xsl:value-of select="./telefono/telefono_cellulare"/>
    </text>
  </xsl:template>
</xsl:stylesheet>
Se le eseguo da command line con il programma della
microsoft msxsl.exe il risultato è un perfetto file
svg :
codice:
<?xml version="1.0" encoding="UTF-16"?><svg width="100%" height="100%" xmlns:fo="http://www.w3.org/1999/XSL/Format"><title>Rubrica in versione SVG</title>
  <rect x="10" y="10" width="180" height="30" fill="lightblue" stroke="blue" stroke-width="2" /><text x="20" y="30" font-family="times" font-width="20" fill="black">Rossi_Mario</text><rect x="10" y="40" width="200" height="150" fill="white" stroke="blue" stroke-width="2" /><text x="20" y="60" font-family="times" font-width="20" fill="blue">
      Via: via bianchi 1</text><text x="20" y="80" font-family="times" font-width="20" fill="blue">
      CAP: 00000</text><text x="20" y="100" font-family="times" font-width="20" fill="blue">
      Citta': Roma</text><text x="20" y="120" font-family="times" font-width="20" fill="blue">
      Telefono (fisso): 123456</text><text x="30" y="140" font-family="times" font-width="20" fill="blue">
      Telefono (cellulare): 987656412</text>
</svg>
Se apro il file XML da IE6 il risultato è la visualizzazione
dei soli testi in formato non grafico.
Credo che IE non riesca a capire che il file inviato produce
un svg, ho installalo il pug-in della adobe e il file prodotto
da linea di comando si visualizza nel browser in maniera correta,
spero proprio che qualcuno mi possa aiutare un ringraziamneto anticipato e Buon Natale a tutti
Ciao Silvio