Appropriate DOCTYPE for XML Formatting Rules

K

Kris

Hi All,

I have what is quite possibly a stupid question about XML formatting and
DOCTYPE declarations. I am using FrontPage 2003 to apply XML formatting
rules to my web pages by right clicking in the code view and selecting
"Apply XML Formatting Rules". Using the command made changes similar to the
following:

Original Line:
<img src="my_image.gif" width="35" height="9" alt="alt_text">

New Line (the only difference is the forward-slash at the end):
<img src="my_image.gif" width="35" height="9" alt="alt_text" />

My question is: If I use XML formatting is it still appropriate to use the
DOCTYPE declaration shown below or do I have to use some sort of XML
declaration.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


Thank-You,
Kris
 
K

Kris

Thank-you for the speedy reply Cheryl. Can I trouble you with another
possibly stupid follow-up question? I've been using the W3C's MarkUp
Validation Service (http://validator.w3.org/) to check my work and I'm
wonder why code formatted as XHTML passes validation using the HTML DOCTYPE
declaration that I indicated. Do you have any thoughts on this? Does the
HTML 4.01 Strict standard allow for code to be formatted as XHTML and still
be considered valid?

Thanks Again,
Kris
 
S

Stefan B Rusynko

If you look at http://www.w3.org/TR/xhtml1/ you will see that it just formalizes the support already in HTML 4.01 for closing all
tag pairs
- that's what the /> at the end of tags that don't have a specific closing tag does





| Thank-you for the speedy reply Cheryl. Can I trouble you with another
| possibly stupid follow-up question? I've been using the W3C's MarkUp
| Validation Service (http://validator.w3.org/) to check my work and I'm
| wonder why code formatted as XHTML passes validation using the HTML DOCTYPE
| declaration that I indicated. Do you have any thoughts on this? Does the
| HTML 4.01 Strict standard allow for code to be formatted as XHTML and still
| be considered valid?
|
| Thanks Again,
| Kris
|
| | > The appropriate doctype when you use xml formatting is
| >
| > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| >
| > --
| > Cheryl D. Wise
| > MS-MVP-FrontPage
| > http://wiserways.com
| >
| > | > > Hi All,
| > >
| > > I have what is quite possibly a stupid question about XML formatting and
| > > DOCTYPE declarations. I am using FrontPage 2003 to apply XML formatting
| > > rules to my web pages by right clicking in the code view and selecting
| > > "Apply XML Formatting Rules". Using the command made changes similar to
| > the
| > > following:
| > >
| > > Original Line:
| > > <img src="my_image.gif" width="35" height="9" alt="alt_text">
| > >
| > > New Line (the only difference is the forward-slash at the end):
| > > <img src="my_image.gif" width="35" height="9" alt="alt_text" />
| > >
| > > My question is: If I use XML formatting is it still appropriate to use
| the
| > > DOCTYPE declaration shown below or do I have to use some sort of XML
| > > declaration.
| > >
| > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
| > > "http://www.w3.org/TR/html4/strict.dtd">
| > >
| > >
| > > Thank-You,
| > > Kris
| > >
| > >
| >
| >
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top