473,666 Members | 2,386 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XHTML for teaching

I am going to teach a basic Web design course (fundamentals of HTML/CSS,
plus some basic client-side (JavaScript) and server-side (PHP, perhaps
XSLT) scripting). Most of the students do not have any previous knowledge
of all of this.

I am strongly considering teaching XHTML 1.0 Strict instead of HTML 4.01
strict, for the following reasons:
- XML syntax is far more simple to teach than HTML/SGML, simply because
there are not as many exceptions and subtleties.
- The stricter the language is, the stricter they are compelled to be
when writing webpages.
- It will be easier to use XSLT if they only know about XML and if they
remain the whole time in an XML world.
- They will have some other courses where XML is used, so that they
should be in familiar territory.
- XML is the future (rather lame argument, I know, but one I believe in
;-).

They would be required to validate all their webpages, obviously, so that
it will not be tag soup. Webpages would be served as text/html for IE
support (or I might try to install some content negociation mechanism)
and I would talk about respecting Appendix C compatibility rules (by the
way, is there an on-line tool for checking conformity with these?).

One of the major drawback I see is the obligation to remove the XML
prolog, to be sure IE is in strict mode for CSS, and therefore to make
sure that all webpages are in UTF-8.

Does anybody see any other reason not to use XHTML in this very specific
context?

--
Pierre Senellart
Sep 18 '05 #1
12 1990
Pierre Senellart <in*****@invali d.org> wrote:
Does anybody see any other reason not to use XHTML in this very specific
context?


There's nothing specific about your context.

Check out the current thread "XHTML 1.0 / 1.1 / 2.0" in this group, and
http://www.spartanicus.utvinternet.ie/no-xhtml.htm

--
Spartanicus
Sep 18 '05 #2
Spartanicus ,comp.infosyste ms.www.authoring.html:
Does anybody see any other reason not to use XHTML in this very specific
context?
There's nothing specific about your context.


Yes, there is. I provided a number of arguments in favor of XHTML in this
specific context. The main one is that it is much easier for
students to learn XML syntax than HTML syntax (all the more since the
HTML dialect that user agents understand is not formally described by
anything, and is definitely not described by SGML rules). The more
simple, the better.
Check out the current thread "XHTML 1.0 / 1.1 / 2.0" in this group, and
http://www.spartanicus.utvinternet.ie/no-xhtml.htm
I am familiar with these arguments, but I am still not convinced in
contrast with the arguments in my original message.

In particular:
# It's stricter.
There's nothing to stop an author from applying the same "strictness "
to HTML. This is purely down to the author, it doesn't need a stricter
DTD. You prefer having closing paragraph tags? What's stopping you from
using them? They are valid under HTML. For those that like the idea
that validation warns them if they for example forget to close a
paragraph element, it's not difficult to validate using a custom HTML
DTD that is as strict as the XHTML DTD. A short guide to validating
against a custom DTD.


I definitely do not want to make them validate against a cutom SGML DTD
they (and I, for that matter!) will not understand anything of.
Sep 18 '05 #3
In article <dg***********@ nef.ens.fr>,
Pierre Senellart <in*****@invali d.org> wrote:
I am going to teach a basic Web design course (fundamentals of HTML/CSS,
plus some basic client-side (JavaScript)
Client-side JS interacts differently with application/xhtml+xml and
text/html.
I am strongly considering teaching XHTML 1.0 Strict instead of HTML 4.01
strict, for the following reasons:
- XML syntax is far more simple to teach than HTML/SGML, simply because
there are not as many exceptions and subtleties.
But if they send it as text/html, the subtleties are worse than learning
HTML.
- It will be easier to use XSLT if they only know about XML and if they
remain the whole time in an XML world.
TSaxon: http://mercury.ccil.org/~cowan/XML/tagsoup/tsaxon/
and I would talk about respecting Appendix C compatibility rules (by the
way, is there an on-line tool for checking conformity with these?).
http://qa-dev.w3.org/~bjoern/appendix-c/validator/
I don't know if it really works.
therefore to make
sure that all webpages are in UTF-8.
Using UTF-8 is the best practice that should be taught anyway.
Does anybody see any other reason not to use XHTML in this very specific
context?


The issues related to Appendix C are likely more confusing that HTML.
See also: http://www.hixie.ch/advocacy/xhtml

--
Henri Sivonen
hs******@iki.fi
http://hsivonen.iki.fi/
Mozilla Web Author FAQ: http://mozilla.org/docs/web-developer/faq.html
Sep 18 '05 #4


Pierre Senellart wrote:
I am going to teach a basic Web design course (fundamentals of HTML/CSS,
plus some basic client-side (JavaScript) and server-side (PHP, perhaps
XSLT) scripting). Most of the students do not have any previous knowledge
of all of this.

I am strongly considering teaching XHTML 1.0 Strict instead of HTML 4.01
strict, for the following reasons:
- XML syntax is far more simple to teach than HTML/SGML, simply because
there are not as many exceptions and subtleties.
- The stricter the language is, the stricter they are compelled to be
when writing webpages.
- It will be easier to use XSLT if they only know about XML and if they
remain the whole time in an XML world. They would be required to validate all their webpages, obviously, so that
it will not be tag soup. Webpages would be served as text/html for IE
support (or I might try to install some content negociation mechanism)
and I would talk about respecting Appendix C compatibility rules


But with XHTML served as text/html and all those compatibility rules the
trouble starts:

- For instance you say you want them to use XML all the time and then
XSLT too. Have you considered how you get the XSLT processor then to
transform to XHTML that follows the compatibility rules? XSLT 1.0 as
specified by the W3C has no support for that, it has output methods
text, xml, and html where the last is suitable for HTML (4) output and
where the xml output method is simply a general XML output method that
has no clue about any XHTML as text/html compatibility rules. So to
generate XHTML with XSLT 1.0 you can of course use the xml method but
whether an empty element like br is then serialized as
<br></br>
or
<br/>
or
<br />
is not something you could configure with most XSLT processors. And to
be compliant with the compatibility rules you would need to enforce
<br />
There are some XSLT processor which provide an additional output method
xhtml, there are XSLT processor where you can, depending on your
programming skills, write your own serializer and plug that in to make
sure you get XHTML complying with the compatibility rules but of course
all that is becoming processor dependent then.

- For basic client-side scripting you would probably use document.write
then for instance but in your XHTML documents treated as text/xml or
application/xml or application/xhtml+xml the method is not working. And
that is only one example for client-side scripting where your
expectation "XML syntax is far more simple to teach than HTML/SGML,
simply because there are not as many exceptions and subtleties." blows
up because you need to fullfill not only XML syntax but SGML syntax too
(Appendix C compatibility) and deal with all those exceptions and
subtleties that treating your documents as both text/html and
application/xhtml+xml introduces.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 18 '05 #5
Pierre Senellart wrote:
Yes, there is. I provided a number of arguments in favor of XHTML in this
specific context. The main one is that it is much easier for
students to learn XML syntax than HTML syntax (all the more since the
HTML dialect that user agents understand is not formally described by
anything, and is definitely not described by SGML rules).


Whereas XHTML is supported by very few user agents but it often served as
text/html in which case it is handled by those same HTML dialect rules you
mentioned.

--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Sep 18 '05 #6
Henri Sivonen ,comp.infosyste ms.www.authoring.html:
Client-side JS interacts differently with application/xhtml+xml and
text/html.
I thought the differences were quite minor, but after reading
http://www.hixie.ch/advocacy/xhtml I saw it was a bit more complex.
You have a point here.
TSaxon: http://mercury.ccil.org/~cowan/XML/tagsoup/tsaxon/
Yes, Gnome's libxslt also does this kind of thing (XSLT on HTML
documents), but it is still something I use only when I don't have the
choice.
http://qa-dev.w3.org/~bjoern/appendix-c/validator/
I don't know if it really works.


Thanks, I'll have a look.

Thanks for the other comments too, I am still pondering it.
Sep 18 '05 #7

Pierre Senellart wrote:
I am strongly considering teaching XHTML 1.0 Strict ....One of the major drawback I see is the obligation to remove the XML
prolog, to be sure IE is in strict mode for CSS, and therefore to make
sure that all webpages are in UTF-8.


Or US-ASCII. :) We members of the ASCII Preservation Society wouldn't
want you to teach your students that the new-fangled eye-candy Johnny-
come-lately bloatware UTF-8 is the *only* choice. What if we run into
a bit shortage and can no longer afford a whole 8 bits per character?
:) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :) :)

--
Guy Macon <http://www.guymacon.co m/>
Sep 18 '05 #8
On Sun, 18 Sep 2005, Guy Macon wrote:
Or US-ASCII. :) We members of the ASCII Preservation Society
wouldn't want you to teach your students that the new-fangled
eye-candy Johnny- come-lately bloatware UTF-8 is the *only* choice.


Bzzzzt! US-ASCII *is* utf-8. Or, at least, a subset of it.

SCNR.
Sep 18 '05 #9

Alan J. Flavell wrote:

On Sun, 18 Sep 2005, Guy Macon wrote:
Or US-ASCII. :) We members of the ASCII Preservation Society
wouldn't want you to teach your students that the new-fangled
eye-candy Johnny- come-lately bloatware UTF-8 is the *only* choice.


Bzzzzt! US-ASCII *is* utf-8. Or, at least, a subset of it.


Right, but there are occasions where you have to choose between
encoding="utf-8" and encoding="US-ASCII" or between charset=utf-8
and charset=US-ASCII... A true ASCIIphile such as myself will
always explicitly specify the subset. There is no good technical
reason to do so, but it is well known that ASCII makes one much more
attractive to members of one's preffered gender... :)
Sep 18 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

20
2343
by: Mediocre Person | last post by:
Well, after years of teaching grade 12 students c++, I've decided to make a switch to Python. Why? * interactive mode for learning * less fussing with edit - compile - link - run - debug - edit - compile - link - run -..... * lots of modules * I was getting tired of teaching c++! Bored teacher = bad instruction.
16
7091
by: Mcginkel | last post by:
I am trying to find a way to load XHTML content in an Iframe. I use to do this in html by using the following code : var iframeObject = document.createElement("iframe"); MyDiv.appendChild(iframeObject); var data = "<html><head><title>testing</title></head><body>data</body></html>" iframeObject.contentDocument.open(); iframeObject.contentDocument.writeln(data);
82
5672
by: Buford Early | last post by:
I read this in http://annevankesteren.nl/2004/12/xhtml-notes "A common misconception is that XHTML 1.1 is the latest version of the XHTML series. And although it was released a bit more than a year later then the first version of XHTML 1.0, the second edition is actually newer. Furthermore, XHTML 1.1 is not really the follow-up of XHTML 1.0" I thought that XHTML 1.1 was the follow-up to XHTML 1.0 and that XHTML 2.0 will someday be the...
2
2634
by: Joris Janssens | last post by:
I'm trying to write a program for validating XHTML 1.1-documents against the XHTML 1.1 DTD (which is actually the same as validating an XML-file) but I always get a "(404) Not found" error. This is the program itself : ******************************************************************** using System; using System.Xml; using System.Xml.Schema;
16
4368
by: msnews.microsoft.com | last post by:
I am teaching C# to my 11 year old child. One challenge is that all the C# books I own and that I have seen in bookstores are full of language that is not easily comprehended by a student at that age. Can anyone recommend books (or perhaps websites) tuned for younger audiences? BTW, its amazing how fast a student can absorb this kind of information at that age. Lucky them! Thanks, Bruce
12
2407
by: Alex D. | last post by:
How can I stop asp.net from rendering XHTML istead of HTML? My javascripts are rendering wrong because of that. It is rendering &amp; to clients instead of &. Any help? Thanks, Alejandro.
1
2442
by: Simon Barnett | last post by:
Hi, RE: Converting pages including ASP pages for XHTML My question relates to ASP not ASP.NET - I can't find a newsgroup for ASP and hoped it was still relevant in ASP.NET - sorry if it's not. Problem: I am teaching myself about validating for XHTML and, upon testing a page I get errors for the use of the 'name' attribute in form fields. It seems that you have to replace the 'name' attribute for the 'id' attribute.
24
2625
by: Dan Jacobson | last post by:
I shall jump on the XHTML bandwagon. I run my perfectly good html4/strict pages thru $ tidy -asxhtml -utf8 #to get: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Language" content="zh-tw" /> knowing all the time as...
30
2255
by: abracad_1999 | last post by:
Is it possible to serve valid xhtml with php? xhtml requires the 1st line: <?xml version="1.0" encoding="iso-8859-1"?> But php interprets the opening <? as a php statement. If I try to echo this in PHP: <?php echo '<?xml version="1.0" encoding="iso-8859-1"?>'; ?>
0
8440
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8355
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8866
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8550
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8638
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7381
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4365
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1769
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.