Subject: AW: [xsl] declare the charset by an output element not the xml declaration? From: <christof.hoeke@xxxxxxx> Date: Tue, 15 Jun 2004 16:46:45 +0200 |
For HTML you would normally use a <meta> element: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> or an HTTP header. this works in most cases. question is if the <?xml version="1.0"?> would implicitly mean encoding="utf-8" though, does somebody know? i normalley ommit the xml declaration for XHTML as some browsers (notably IE6) behave slightly different with it. chris > -----Ursprüngliche Nachricht----- > Von: Markus Hanel [mailto:markus.hanel@xxxxxx] > Gesendet: Dienstag, 15. Juni 2004 16:40 > An: xsl mailinglist > Betreff: [xsl] declare the charset by an output element not the xml > declaration? > > > Hallo, > we want to hold the charset of the stylesheet flexibel. Is it > well formed to > give no encoding in the xml declaration but in the output element? > > Many thanks, > markus > > <?xml version="1.0"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > <xsl:template match="/"> > <html> > <head> > <xsl:processing-instruction name='output'> > <xsl:text>method="html" > </xsl:text><xsl:text>encoding="</xsl:text><xsl:value-of > select="$etc/et[attribute::name = 'charset']" /><xsl:text>"</xsl:text> > </xsl:processing-instruction> > <title></title> > </head> > > <body> > <xsl:apply-templates /> > </body> > </html> > </xsl:template> > > > --+------------------------------------------------------------------ > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/ > or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx> > --+-- > >
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
More mixed XML & HTML, Stephen Tredrea | Thread | RE: [xsl] More mixed XML & HTML, Passin, Tom |
More mixed XML & HTML, Stephen Tredrea | Date | RE: [xsl] More mixed XML & HTML, Passin, Tom |
Month |