The encoding attribute specifies the preferred encoding to be used. The html output method should add a META element immediately after the start-tag of the HEAD element specifying the character encoding actually used. Stylesheet 1 outputs in UTF-8, Stylesheet 2 in UTF-16, and Stylesheet 3 in Cp1250. In Stylesheet 4 look at the source of the lowest middle window in your browser. The xml source contains characters which are not present in specified character set and they are therefore escaped.
<xslTutorial >
|
|
<HTML>
|
<HEAD>
|
<TITLE>HTML</TITLE>
|
</HEAD>
|
<BODY>
|
<H1> HTML output </H1>
|
Žížala šnek kočka pařez bečka měšec výr
|
</BODY>
|
</HTML>
|
</xslTutorial> |
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
<HTML>
|
<HEAD>
|
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
<TITLE>HTML</TITLE>
</HEAD>
|
<BODY>
|
<H1> HTML output </H1>
Žížala šnek kočka pařez bečka měšec výr
</BODY>
</HTML>
|
HTML
HTML output
Žížala šnek kočka pařez bečka měšec výr