RE: Indicating browser support for XHTML1.0

Hello Monostory Miklos, dear list members,

> -----Original Message-----
> > Common problems of XHTML are:
> >
> > 1. The XML Declaration
> >
> > So use no XML declaration and because of that use either US-ASCII-7 or
> UTF-8
> > as your character encoding.
> > This doesn't mean you can't use "special" characters like umlauts or
> chinese
> > letters, they simple need to be encoded using their character entity
> > representations, e.g. like ü or, if you include a doctype
> declaration,
> > ü for the German "ü".
>
> It's very interesting, in terms of I develop sites in Hungary and the used
> language is the Hungarian.
> So, in this language there are many "special character", whats are well
> represented in iso-8859-2,
> but quite slow to type their etnities.

which is of no interest because you simple use an XSLT copy transformation
that reads iso-8859-2 and writes ASCII. It's all so simple :)

XHTML Source in propretary encoding containing special characters

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
"http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xml:lang="de">
	<head>
		<title>Übung 1</title>
	</head>
	<body>
		<h1>Übung 1</h1>
		<p>
			Ändern des Encodings: Copy-Stylesheets haben Hand und Fuß.
		</p>
	</body>
</html>


XSLT transformation rule (sometimes called Stylesheet, but in this case this
name probably doesn't meet the purpose) to transform iso-8859-1 to ASCII.

<?xml version="1.0"?>
<xsl:transform xslns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">

	<xsl:output
		method="xml"
		omit-xml-declaration="yes"
		output-encoding="US-ASCII-7"
		doctype-public="-//W3C//DTD XHTML Basic 1.0//EN"
		doctype-system="http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd"
	/>

	<xsl:template match="*|@*|comment()">
		<xsl:copy>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>

</xsl:transform>


I am not sure about the hungarian language code and special characters, so I
gave a german example.
I do not guarantee the supplied stylesheet works with all transformators
(processors) or does not contain typos ;)
And I know some transformators don't know US-ASCII-7 under that name, you
might have to change it to ASCII or US-ASCII, and some might even be case
sensitive regarding the name of the encoding.


Any questions: simple ask (if you consider them too off topic, simple reply
privately).


Greetings, have a long life and a lot of fun
(or should I say "life long and prosper"?)

Christian

Received on Thursday, 22 November 2001 16:37:53 UTC