473,583 Members | 3,460 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DTDs, www & validation

I've been wandering around the results of numerous googles for several
hours without reaching a conclusive solution, so I'm dipping a tentative
toe back in ciwah...

I've been persuaded here in the past that serving xhtml is a bad thing (tm).

I want the extra constraints xhtml imposes.

It has been suggested before to create a DTD which requires these &
includes all the requirements of HTML 4.01 & validate against that.

I've downloaded such a document from
http://www.spartanicus.utvinternet.i...1-stricter.dtd which I'm
sure looks familiar to all the regulars here.

My questions are pretty simple to state:

How do I make use of this to achieve the above?

I know I can declare <!DOCTYPE HTML SYSTEM
"http://www.spartanicus .utvinternet.ie/html401-stricter.dtd">
(though I'd first either enquire as to whether I should use this url or
duplicate the file on my own server).

However I'm concerned as to whether some browsers will do something
undesirable in their interpretation of my pages when they see this,
rather than a standard public declaration.

Also, http://www.spartanicus.utvinternet.ie/no-xhtml.htm which links to
the above DTD, declares itself as HTML 4.01.

This leads me to wonder, am I supposed to use the !DOCTYPE HTML SYSTEM
form only for development validation & then replace this with a !DOCTYPE
HTML PUBLIC referring to HTML 4.01 prior to the site going live?

However, if that is what one should do, why not just declare an XHTML
1.0 doctype while developing & then replace this with the html 4.01 type
prior to going live to achieve an equivalent effect?

Is there an ideal solution?

Along the way, which resources do the readers here use for validation?
Software installed locally & if so, what, or the online services of w3c
or wdg?

Lastly, for a current project I'm forced to use DreamweaverMX20 04; can
it be persuaded to validate against a custom dtd?

Perhaps there's a different & better solution to this whole problem.

--
Michael
m r o z a t u k g a t e w a y d o t n e t
Jul 23 '05
81 4635
On Fri, 10 Dec 2004 21:27:33 +0000, Michael Rozdoba
<mr**@nowhere.i nvalid> wrote:
I want the extra constraints xhtml imposes.


It doesn't. XHTML is (by design) a literal transcoding of HTML 4.01
(both Strict and Transitional) from HTML's almost-SGML into XML.
There are _no_ extra constraints imposed by XHTML.

Now if you want to do this (there are negligible good reasons to do
so), then just use XHTML. Or you could invent your own XML-flavour of
HTML 4.01 and use that with its own DTD, but this would have to be
equivalent to XHTML anyway.

XHTML causes problems for serving to browsers (allegedly) because of
its XML nature, not because of its DTD. Any "constraint " you might
wish to gain can only be this same added XML nature, and so you might
as well switch wholesale to XHTML.

XHTML does not modify the HTML 4.01 DTD. If you wanted to do this
(maybe add the <blink> element), then you could certainly do so, but
you'd do that by a custom DTD and could stay within the bounds of
SGML-style HTML

--
Smert' spamionam
Jul 23 '05 #11
Michael Rozdoba <mr**@nowhere.i nvalid> writes:
Eric B. Bednarz wrote:
(groups-beta is bloody annoying, BTW).


I've not made my mind up - without getting too OT, what's annoying you
the most?


Legacy URI references to articles are redirected to threads (WTF is
that? It even seems like more work).

To view a single message I have to choose options, and then individual
message (one action for the price of two, how cool); once I'm there, to
go to the thread I have to choose options and, erm, get a link to the
message that I'm currently viewing. If I didn't come from the thread,
dead end.

What's the point of killing the framed tree view when I get a pointless
sidebar instead of some screen estate?

How much webdesigners does it take to install a light bulb, or combine
impenetrable table-salad with all the disadvantages of CSS layout?

<http://sandbox.bednarz .nl/.swap/beta.png> (20.5KiB)
I wonder if I can do that with vim?
Not that I know of.
I'm using vim not as I know it yet
but because I like it
Oh, but Vim *is* a much better text-editor than Emacs. To write HTML
from scratch, I'd almost always use Vim; but to edit Document Types I'm
not familiar with I'd almost always use Emacs. The same goes for minor
changes, because I'm usually in it anyway because I use it as (local and
remote) file manager, email and news client and to have my cup of tea.
forget why I plumped for vi et al rather than emacs.


Maybe your hands aren't big enough to perform most of the required
keyboard longcuts. :)
--
| ) Più Cabernet,
-( meno Internet.
| ) http://bednarz.nl/
Jul 23 '05 #12
"Andy Dingley" <di*****@codesm iths.com> wrote in message
news:6f******** *************** *********@4ax.c om...
On Fri, 10 Dec 2004 21:27:33 +0000, Michael Rozdoba
<mr**@nowhere.i nvalid> wrote:
I want the extra constraints xhtml imposes.

There are _no_ extra constraints imposed by XHTML.


Not correct. E.g., xHTML requires end tags where in HTML they are optional.

Jul 23 '05 #13
Eric B. Bednarz wrote:
Michael Rozdoba <mr**@nowhere.i nvalid> writes:
[annoying google groups beta]
Legacy URI references to articles are redirected to threads (WTF is
that? It even seems like more work).
Ah yes, I did notice that. Thankfully I usually want thread views, but
now I see what you mean.

[snip critique]

Um, it is beta ;)

I hope they're getting informative feedback.
How much webdesigners does it take to install a light bulb, or combine
impenetrable table-salad with all the disadvantages of CSS layout?

<http://sandbox.bednarz .nl/.swap/beta.png> (20.5KiB)
Ouch :/

[vim/emacs]
Oh, but Vim *is* a much better text-editor than Emacs. To write HTML
from scratch, I'd almost always use Vim; but to edit Document Types I'm
not familiar with I'd almost always use Emacs. The same goes for minor
changes, because I'm usually in it anyway because I use it as (local and
remote) file manager, email and news client and to have my cup of tea.


LOL. I guess if I'm doing this enough I'll eventually learn which tool
does the best job for each task.

--
Michael
m r o z a t u k g a t e w a y d o t n e t
Jul 23 '05 #14
Darin McGrew wrote:
Closing empty tags makes it invalid HTML. Well, sorta, depending on the
empty tag.
[snip]
Appendix C compatability relies on browsers ignoring this bit of SGML-based
trivia. Most do, but not all.


I was aware that it usually works but not that this is as a result of
what looks like a fluke. I don't mind bending rules to get meet my
desires but I'm not keen on breaking them without very good reason. Thanks.

--
Michael
m r o z a t u k g a t e w a y d o t n e t
Jul 23 '05 #15
Spartanicus wrote:
Michael Rozdoba <mr**@nowhere.i nvalid> wrote:
Though atm I see it won't let me close empty tags. Is that a bad
thing to want to do with something claiming to be HTML 4.01?


Of course it is, it's not allowed under HTML.


I do seem able to ask really stupid questions sometimes.
I'd rather have my docs in a format as close to XML as possible,
whilst still being valid HTML 4.01.


Feel free to author in X(HT)ML if it has a real benefit to you (the
ability to use XML tools on the data for example), you should then
use those XML tools to generate HTML from the X(HT)ML and serve that
to clients.


Yes, understood. It's clear I ought to be serving HTML 4.01 & this must
be valid. I like XHTML, but browsers can't generally handle it when
served correctly.

The above are the only reasonable courses of action. For now I'll stick
with HTML 4.01. When I need to automate handling of larger volumes of
data I'll use XHTML & generate HTML from it either prior to serving or
before uploading to the server.

--
Michael
m r o z a t u k g a t e w a y d o t n e t
Jul 23 '05 #16
C A Upsdell:
xHTML requires end tags where in HTML they are optional.


More precisely, XHTML requires all elements are closed. There's an
important difference.
Jul 23 '05 #17
Neal <ne*****@yahoo. com> writes:
C A Upsdell:
xHTML requires end tags where in HTML they are optional.


More precisely, XHTML requires all elements are closed. There's an
important difference.


Please don't hesitate to elaborate on that.
--
| ) Più Cabernet,
-( meno Internet.
| ) http://bednarz.nl/
Jul 23 '05 #18
Eric B. Bednarz:
Neal:
C A Upsdell:
xHTML requires end tags where in HTML they are optional.

More precisely, XHTML requires all elements are closed. There's an
important difference.

Please don't hesitate to elaborate on that.


Sure.

<p>text</p> is a care where the element is closed, and the required end
tag is included. As long as we're talking about non-empty elements, the
two descriptions are similar enough.

<img ... /> is a closed empty element. The term "end tag" (which clearly
implies there is a "start tag") implies that <img ...></img> would be
correct. While this can be valid XML, it is not appropriate for XHTML. The
img element does not take an end tag - the one tag used to mark that
element is inherently closed.

It's much more useful in this context to think of elements rather than
tags. All elements require closure, but not all tags must appear in
start/end pairs.
Jul 23 '05 #19
Spartanicus wrote:
Michael Rozdoba <mr**@nowhere.i nvalid> wrote:

I know I can declare <!DOCTYPE HTML SYSTEM
"http://www.spartanicus .utvinternet.ie/html401-stricter.dtd">
(though I'd first either enquire as to whether I should use this url or
duplicate the file on my own server).

However I'm concerned as to whether some browsers will do something
undesirable in their interpretation of my pages when they see this,
rather than a standard public declaration.

Unlikely (I'm not aware of any that do), but it's possible.


My main concern was would IE end up in quirks mode.
Also, http://www.spartanicus.utvinternet.ie/no-xhtml.htm which links to
the above DTD, declares itself as HTML 4.01.

This leads me to wonder, am I supposed to use the !DOCTYPE HTML SYSTEM
form only for development validation & then replace this with a !DOCTYPE
HTML PUBLIC referring to HTML 4.01 prior to the site going live?

As you've realised it revolves around how you validate, if you want to
use one of the online validators then you'd have to use a custom system
doctype and upload the DTD to your server. (linking to a DTD on someone
else's server is not nice


I wouldn't do that unless given permission first.
and it makes you dependant on that server)
Only sensible if that server is much more reliable than yours... erm but
if down users'd not be able to fetch the html nevermind the dtd - oops,
forget I thought that.
If you use a local validator then for DTDs that use a subset of the
public DTD, (no new elements), you can use the public doctype and
override the location of the DTD locally to a local DTD. (I've elected
to omit the uri from the doctype declaration but this isn't the best
way).
I seem to recall if you give the full uri it triggers certain alignment
bugs in IE 6 (I came across this when looking at articles discussing
modifying Dreamweaver config files recently):

http://www.macromedia.com/devnet/mx/...standards.html
http://www.dwfaq.com/IE6/

Some of the other info is dodgy, so I don't know how reliable that it.

What are the problems of giving no uri?
Personally I use ARV as a local Windows validator (
http://www.arealvalidator.com ) Note that it has a limitation: it can
only validate files on the local file system, not on a server.
Indeed. It seemed to be the only option I could find (a few other
related possibilites did turn up)
From the link Eric provided you will have understood that certain
differences between XHTML and HTML like mandatory attribute quoting and
element case sensitivity are not governed by the DTD but by the SGML
stuff that goes with it.


I didn't take that all in last night... Ah right, okay. I've made the
corresponding changes to html.soc & HTML4.dcl now & attribute value
quoting is now required.

That just leaves element case sensitivity...

Hmm, reading, though not necessarily understanding,
http://home.chello.no/~mgrsby/sgmlintr/chapter3.htm

Leads me to the following guess -

If I want to require elements & attributes to be lowercase the following
is necessary & sufficient:

In the .dcl specify SYNTAX NAMING NAMECASE GENERAL as NO, and in the
dtd, specify all element & attribute names in lowercase.

Is that at all close to the mark?

Either way, editing the dtd in respect of the latter could easily result
in a few errors. Does anyone have a copy of the html 4.01 dtd modified
in this respect /&/ to enforce closing of elements?

--
Michael
m r o z a t u k g a t e w a y d o t n e t
Jul 23 '05 #20

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

Similar topics

4
3014
by: Luklrc | last post by:
Hi, I'm having to create a querysting with javascript. My problem is that javscript turns the "&" characher into "&amp;" when it gets used as a querystring in the url EG: /mypage.asp?value1=1&amp;value2=4&amp; ... which of course means nothing to asp.
9
3407
by: Ray | last post by:
I need to convert the normal calendar to show the week no., the period no. and the financial year. The financial year format is as follows:- Date start: 2 May, 2005 7 days a week, 4 weeks a period and 13 periods a year. normally 52 weeks per year but one 53-week a year every 6 years. The 53th week is included in period 13. Can someone...
9
3129
by: wardy1975 | last post by:
Hi All, Looking for a little expert advice on a few web standards issues. I am currently trying to understand the impact of web standards for a web application I work with. I have been doing a lot of research in the areas of XHTML and WAI compliance, and am attempting to come up with a recommendation for our product in terms of standards...
14
5917
by: Arne | last post by:
A lot of Firefox users I know, says they have problems with validation where the ampersand sign has to be written as &amp; to be valid. I don't have Firefox my self and don't wont to install it only because of this, so I hope some of you gurus can enlighten me with this :) In what circumstances can the "&amp;" in the source code be involuntary...
5
1304
by: Andy Dingley | last post by:
How can I best make a composite DTD by including one DTD inside another ? There's a pre-existing DTD in an external Apache project. I'd like to make use of this within our internal project, suitably extended and wrapped. With the aid of an internal and external subset I can do this, as follows: <?xml version="1.0"?> <!DOCTYPE Container
0
1256
by: Kza | last post by:
Hi, I have a project that works at home, but not at the customers location, where their network is not on the internet. This is the error: An exception occurred! Type:NetAccessorException, Message:The host/address 'www.asam.net' could not be resolved Fatal error encountered during schema scan
0
1678
by: Mudiya Dissa | last post by:
Hi, I have some code on my application like the following <% redirectUrl = "mypage.asp?type=100&id=something&view=10 'some more asp code
1
1833
by: MayoM | last post by:
My form has some simple validation in the Before Update event. If the validation fails the code ends with DoCmd.CancelEvent The form also has an Update command button. This simply runs Me.Refresh When the button is clicked, Me.Refresh triggers the Before Update code. If the validation fails and DoCmd.CancelEvent is executed, I get...
0
7893
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, well explore What is ONU, What Is Router, ONU & Routers main...
0
7821
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...
0
8172
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. ...
0
8317
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7928
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...
0
8188
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...
1
5695
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1422
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1151
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...

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.