Re: [xslt] Does xslt has any encoding settings?



Thanks Daniel for your answer. I am doing that and still didnt get the
correct output and hence wondering whether xslt uses something like
that. Probably this fall outside the scope of this mailing list, but
with a hope someone will answer I am posting here.

These are the xml and xsl. I read through the docs and certainly I am
missing something, but cannot figure it out.

Xml:
 <?xml version="1.0" encoding="ISO-8859-1"?>
 <Album>
 <ThumbPath>th_100_001à.jpg</ThumbPath>
 </Album>
 
 
 Xsl:
 <?xml version="1.0" encoding = "ISO-8859-1"?>
 <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:fo="http://www.w3.org/1999/XSL/Format";>
       <xsl:output method="html" version="4.0" encoding="ISO-8859-1"
indent="yes"/>
       <xsl:template match="/">
               <html>
                       <head>
                       </head>
                       <body>
                                   <xsl:value-of
select="Album/ThumbPath" />
 
 <IMG>
   <xsl:attribute name="src">
     <xsl:value-of select="Album/ThumbPath" />
   </xsl:attribute>
 </IMG>
                       </body>
               </html>
       </xsl:template>
 </xsl:stylesheet>
 
 
 
 This produces the output:
 
 <html xmlns:fo="http://www.w3.org/1999/XSL/Format";>
 <head>
 <META http-equiv="Content-Type" content="text/html; charset=UTF-16">
 </head>
 <body>th_100_001Ã .jpg<IMG src="th_100_001%C3%A0.jpg"></body>
 </html>

As you can see the first <xsl:value-of select="Album/ThumbPath" />   is
transformed correctly. However the second which is inside the IMG tag
doesnt. Any help appreciated. I tried to find it out myself by reading
through the docs, but I give up, I need some help.

Thanks a lot in advance,
Joseph




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]