XHTML queries

by "Toller" <toller(at)ntlworld.com>

 Date:  Mon, 12 Jun 2000 00:09:24 +0100
 To:  <hwg-xml(at)hwg.org>
  todo: View Thread, Original
I hope that no-one minds me posting a few basic XHTML questions here. I
suspect that most people here are interested in XML (way above my head!) but
this still seemed to be the best group to post to. I have been 'lurking' for
a while but I haven't actually received any posts - so I am not even sure if
anyone will read this... OK, I'll be brave and jump right in:

I am not such a newbie to HTML but I am to XHTML and I have nearly completed
my first site in it:
http://www.wren.f2s.com/testbed/dlk/
This site is in German (which I have only a very basic knowledge of) but all
my other sites are in English (UK).

I have read a few online XHTML tutorials but  despite a few hours searching,
I cannot find the answer to a few basic queries.  I did trying reading the
specifications, but I confess that I only half-understood them. So, here
goes:

1. Am I right in thinking that XHTML files are saved as .html rather than
.xhtml? I can't find anything on this one.

2. What xml declaration should I use? I am terribly confused about the whole
area of character sets and encoding. Does anyone know of any URL where I can
go and read about it in words of one syllable?
 I note that without an xml declaration, the  encoding will use the default
UTF-8 or UTF-16. What are these and which one is likely to be my default? If
I don't want these, what else can I use? I note that W3C
http://www.w3.org/TR/xhtml1/ do not use an xml declaration in their specs
source code even though they encourage others to do so. If they had used
one, I would have copied it! I notice that they do add <meta
http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
however. Does this conflict with their default UTF encoding or does it
override it?

Xml declaration - are these the main choices, then?:
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-16"?>
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="EN"?>

Which one would people recommend I use for my sites?

Also, what are entity sets and do I need to declare them? If so, how? Are
they the same as the character sets and encoding?


3. The specs seem to say that comments are removed entirely - is this really
true or am I misunderstanding it? The tutorials I read did not mention this
at all. Does this mean that anyone reading your source code will not see the
comments? If so, what can one use instead?

4. Similarly, the tutorials I saw made no mention of <script> or <style>.
The specs seem to say that the contents of these should be wrapped in CDATA
as follows:
<script>
 <![CDATA[
 ... unescaped script content ...
 ]]>
 </script>
Do I need to add this CDATA thing to my JavaScript? If so, does anyone know
of a URL model I could refer to so that I can avoid errors? I've just
noticed that W3C do NOT use CDATA in their specs source code around their
style sheet (presumably they don't need to for some reason) - so I daresay I
have misunderstood this as well. The specs seem fairly clear on this point -
C.4 - but not quite clear enough for me, I'm afraid...

Many thanks for any help offered - I really do appreciate it!
Jenny

HWG hwg-xml mailing list archives, maintained by Web Professional Association - IWA