Newsgroup: it.comp.www.asp
Titolo: XML-XSL e vocali accentate

Ciao a tutti,
ho una pagina XSL tramite la quale formatto un XML prelevato da un DB, il
problema è che la pagina non visualizza le vocali accentate.
Mi sembra di ricordare che si deve utilizzare un foglio DTD per la
definizione dei contenuti ma ... non vado oltre.
Avete una dritta ed un esempio ?
grazie mille
silvio

se il file XML lo generi attravero un VBS (WSH) non hai a disposizione la
funzione HTMLEncode del server.
tempo fa ho scritto una funzione che faceva l'encoding.
eccola:
*****
Function Encoda(strHTMLEncode)
  strHTMLEncode= Replace(strHTMLEncode, "&", "&amp;")
  strHTMLEncode= replace(strHTMLEncode,"""", "&quot;")
  strHTMLEncode= Replace(strHTMLEncode, "¡", "&iexcl;")
  strHTMLEncode= Replace(strHTMLEncode, "¢", "&cent;")
  strHTMLEncode= Replace(strHTMLEncode, "£", "&pound;")
  strHTMLEncode= Replace(strHTMLEncode, "¤", "&curren;")
  strHTMLEncode= Replace(strHTMLEncode, "¥", "&yen;")
  strHTMLEncode= Replace(strHTMLEncode, "¦", "&brvbar;")
  strHTMLEncode= Replace(strHTMLEncode, "§", "&sect;")
  strHTMLEncode= Replace(strHTMLEncode, "¨", "&uml;")
  strHTMLEncode= Replace(strHTMLEncode, "©", "&copy;")
  strHTMLEncode= Replace(strHTMLEncode, "ª", "&ordf;")
  strHTMLEncode= Replace(strHTMLEncode, "«", "&laquo;")
  strHTMLEncode= Replace(strHTMLEncode, "", "&not")
  strHTMLEncode= Replace(strHTMLEncode, "®", "&reg;")
  strHTMLEncode= Replace(strHTMLEncode, "¯", "&macr;")
  strHTMLEncode= Replace(strHTMLEncode, "°", "&deg;")
  strHTMLEncode= Replace(strHTMLEncode, "±", "&plusmn;")
  strHTMLEncode= Replace(strHTMLEncode, "²", "&sup2;")
  strHTMLEncode= Replace(strHTMLEncode, "³", "&sup3;")
  strHTMLEncode= Replace(strHTMLEncode, "´", "&acute;")
  strHTMLEncode= Replace(strHTMLEncode, "µ", "&micro;")
  strHTMLEncode= Replace(strHTMLEncode, "", "&para;")
  strHTMLEncode= Replace(strHTMLEncode, "·", "&middot;")
  strHTMLEncode= Replace(strHTMLEncode, "¸", "&cedil;")
  strHTMLEncode= Replace(strHTMLEncode, "¹", "&sup1;")
  strHTMLEncode= Replace(strHTMLEncode, "º", "&ordm;")
  strHTMLEncode= Replace(strHTMLEncode, "»", "&raquo;")
  strHTMLEncode= Replace(strHTMLEncode, "¼", "&frac14;")
  strHTMLEncode= Replace(strHTMLEncode, "½", "&frac12;")
  strHTMLEncode= Replace(strHTMLEncode, "¾", "&frac34;")
  strHTMLEncode= Replace(strHTMLEncode, "¿", "&iquest;")
  strHTMLEncode= Replace(strHTMLEncode, "À", "&Agrave;")
  strHTMLEncode= Replace(strHTMLEncode, "Á", "&Aacute;")
  strHTMLEncode= Replace(strHTMLEncode, "Â", "&Acirc;")
  strHTMLEncode= Replace(strHTMLEncode, "Ã", "&Atilde;")
  strHTMLEncode= Replace(strHTMLEncode, "Ä", "&Auml;")
  strHTMLEncode= Replace(strHTMLEncode, "Å", "&Aring;")
  strHTMLEncode= Replace(strHTMLEncode, "Æ", "&AElig;")
  strHTMLEncode= Replace(strHTMLEncode, "Ç", "&Ccedil;")
  strHTMLEncode= Replace(strHTMLEncode, "È", "&Egrave;")
  strHTMLEncode= Replace(strHTMLEncode, "É", "&Eacute;")
  strHTMLEncode= Replace(strHTMLEncode, "Ê", "&Ecirc;")
  strHTMLEncode= Replace(strHTMLEncode, "Ë", "&Euml;")
  strHTMLEncode= Replace(strHTMLEncode, "Ì", "&Igrave;")
  strHTMLEncode= Replace(strHTMLEncode, "Í", "&Iacute;")
  strHTMLEncode= Replace(strHTMLEncode, "Î", "&Icirc;")
  strHTMLEncode= Replace(strHTMLEncode, "Ï", "&Iuml;")
  strHTMLEncode= Replace(strHTMLEncode, "Ğ", "&ETH;")
  strHTMLEncode= Replace(strHTMLEncode, "Ñ", "&Ntilde;")
  strHTMLEncode= Replace(strHTMLEncode, "Ò", "&Ograve;")
  strHTMLEncode= Replace(strHTMLEncode, "Ó", "&Oacute;")
  strHTMLEncode= Replace(strHTMLEncode, "Ó", "&Oacute;")
  strHTMLEncode= Replace(strHTMLEncode, "Ô", "&Ocirc;")
  strHTMLEncode= Replace(strHTMLEncode, "Õ", "&Otilde;")
  strHTMLEncode= Replace(strHTMLEncode, "Ö", "&Ouml;")
  strHTMLEncode= Replace(strHTMLEncode, "×", "&times;")
  strHTMLEncode= Replace(strHTMLEncode, "Ø", "&Oslash;")
  strHTMLEncode= Replace(strHTMLEncode, "Ù", "&Ugrave;")
  strHTMLEncode= Replace(strHTMLEncode, "Ú", "&Uacute;")
  strHTMLEncode= Replace(strHTMLEncode, "Û", "&Ucirc;")
  strHTMLEncode= Replace(strHTMLEncode, "Ü", "&Uuml;")
  strHTMLEncode= Replace(strHTMLEncode, "İ", "&Yacute;")
   strHTMLEncode= Replace(strHTMLEncode, "Ş", "&THORN;")
   strHTMLEncode= Replace(strHTMLEncode, "ß", "&szlig;")
   strHTMLEncode= Replace(strHTMLEncode, "à", "&agrave;")
   strHTMLEncode= Replace(strHTMLEncode, "á", "&aacute;")
   strHTMLEncode= Replace(strHTMLEncode, "â", "&acirc;")
   strHTMLEncode= Replace(strHTMLEncode, "ã", "&atilde;")
   strHTMLEncode= Replace(strHTMLEncode, "ä", "&auml;")
   strHTMLEncode= Replace(strHTMLEncode, "å", "&aring;")
   strHTMLEncode= Replace(strHTMLEncode, "æ", "&aelig;")
   strHTMLEncode= Replace(strHTMLEncode, "ç", "&ccedil;")
   strHTMLEncode= Replace(strHTMLEncode, "è", "&egrave;")
   strHTMLEncode= Replace(strHTMLEncode, "ê", "&ecirc;")
   strHTMLEncode= Replace(strHTMLEncode, "ë", "&euml;")
   strHTMLEncode= Replace(strHTMLEncode, "ì", "&igrave;")
   strHTMLEncode= Replace(strHTMLEncode, "í", "&iacute;")
   strHTMLEncode= Replace(strHTMLEncode, "î", "&icirc;")
   strHTMLEncode= Replace(strHTMLEncode, "ï", "&iuml;")
   strHTMLEncode= Replace(strHTMLEncode, "ğ", "&eth;")
   strHTMLEncode= Replace(strHTMLEncode, "ñ", "&ntilde;")
   strHTMLEncode= Replace(strHTMLEncode, "ò", "&ograve;")
   strHTMLEncode= Replace(strHTMLEncode, "ó", "&oacute;")
   strHTMLEncode= Replace(strHTMLEncode, "ô", "&ocirc;")
   strHTMLEncode= Replace(strHTMLEncode, "õ", "&otilde;")
   strHTMLEncode= Replace(strHTMLEncode, "ö", "&ouml;")
   strHTMLEncode= Replace(strHTMLEncode, "÷", "&divide;")
   strHTMLEncode= Replace(strHTMLEncode, "ø", "&oslash;")
   strHTMLEncode= Replace(strHTMLEncode, "ù", "&ugrave;")
   strHTMLEncode= Replace(strHTMLEncode, "ú", "&uacute;")
   strHTMLEncode= Replace(strHTMLEncode, "û", "&ucirc;")
   strHTMLEncode= Replace(strHTMLEncode, "ü", "&uuml;")
   strHTMLEncode= Replace(strHTMLEncode, "ı", "&yacute;")
   strHTMLEncode= Replace(strHTMLEncode, "ş", "&thorn;")
   strHTMLEncode= Replace(strHTMLEncode, "ÿ", "&yuml;")
   strHTMLEncode= Replace(strHTMLEncode, "ÿ", "&yuml;")
   strHTMLEncode= Replace(strHTMLEncode, """, """")
   strHTMLEncode= Replace(strHTMLEncode, """, """")
   strHTMLEncode= Replace(strHTMLEncode, "'", "'")
   strHTMLEncode= Replace(strHTMLEncode, "'", "'")
   strHTMLEncode= Replace(strHTMLEncode, "-", "&#45;")
 Encoda=strHTMLEncode
End Function
****
--
CIAO!
Gusher

Oltre all'utile funzione di gusher prova ad inserire questa riga come prima
riga dell'XML
<?xml version="1.0" encoding="ISO-8859-1"?>
--
Francesco Rotondo

 <?xml version="1.0" encoding="ISO-8859-1"?>
O anche:
<?xml version="1.0" encoding="windows-1252"?>
Ci ho sbattuto la testa (e non solo: a buon intenditor... :-P) per quasi un
mese, perché un cliente faceva un copia e incolla da Word, il quale
(simpatico!) utilizza caratteri incompatibili col charset ISO-8859-1.
--
Filippo Di Blasi 
fil...@puntoinformatico.it
http://puntoinformatico.it
 <-- E-shop informatico
http://puntoinformatico.it/usato
 <-- Usato
http://puntoinformatico.it/servizi
 <-- Servizi web


Moderatore di it.comp.www.asp
http://www.aspitalia.com
 Enjoy the .NET community!
http://www.dev2dev.it
 La rete ha connesso nuove particelle!