Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Switching to XHTML 1

Status
Not open for further replies.

Horsebreath

Technical User
Oct 15, 2000
16
US
I'm trying to change the configuration of DW4 to validate XHTML. When I open the files I have a blank screen even though the source is there. What do I need to change in order to view these files so that I can change them?

barbara
 
I think you have to make sure that your browser can view XHTML files...what browser are you testing on?? I have not failed; I merely found 100,000 different ways of not succeding...
 
I'm not viewing these configuration files in a browser. I'm viewing them on my harddrive. C:\ProgramFiles\Macromedia\Dreamweaver4\Configuration\Templates\Default.html

I need to edit the file but it comes up a blank window.
barbara
 
Are you hitting the F12 or the CTRL+F12 key to view the page?? In DW that is the only way to see the content, unless all you're doing it viewing the content in the Design window.
How are you trying to view the page?? Would it be possible for you to copy and paste the XHTML code here?? If its not content sensitive... I have not failed; I merely found 100,000 different ways of not succeding...
 
Ok, I'm feeling really dumb here. I wasn't viewing the file in Dreamweaver. When I looked again I am viewing the file in IE5.5. I just started from MY COMPUTER.

If I'm going to change the default.html file should I view it in Dreamweaver?
barbara
 
This is one of those "Duh" moments. Thanks for jaring me awake. I've been buried all weekend trying to cram XHTML and CSS into my head.

I finally opened the default.html file in Dreamweaver and made the corrections to XHTML. (Yes, I've made copies of the file and am checking that they work as I change each tag file) Wish me luck!
 
NO problem...good luck and let me know what happens...[smile] I have not failed; I merely found 100,000 different ways of not succeding...
 
Well, if someone could mess it up, it would be me.

Tried to change the Image.js file and I've messed it up.
Here is what I have. Can you tell me what to change?
{ return '<img src=&quot;' + newURL + '&quot; />'; }

I thought maybe I need to change quotes but I can't seem to get it right. I messed up my copied file too so I can't even go back to the beginning.

Sure would seem to be a lot more simple if Macromedia just supplied these files as an update to their program.

barbara
 
Well, if you don't know Macromedia by now...

The update is there. You just have to pay for it. Dreamweaver MX has support for XHTML. I tried to get DW4 to deal with XHTML but it couldn't even deal with the xml document declaration. I wrote to Macromedia to ask about XHTML support, and they more or less told me not to bother. Great attitude eh?

If you can't afford MX, then HTML-Kit from can convert HTML files created in Dreamweaver to XHTML files. One more step, but what the heck.

Of course, be sure to check that all the features of HTML that you need aren't the ones that have been dropped in XHTML (or stuck into XHTML-Modular...) --
Dunx
 
Hi people!

Sorry for stupid question, but... What extension should XHTML file have? It's suppose to be .xhtml but! when I save file with such extension (let's say test.xhtml) my browser (IE 6.0) shows it for me as XML source. I thought that server could do some work and I uploaded it to server - the same result - browser shows source instead of what it really should show.

Sorry, I know it's kind of stupid but we all sometimes be in such situations. So, what extension do you use? And is my server (IIS 5.0) should be specially configured to support XHTML.

Thanks in advance! Good Luck! :)
 
Check this page out for an extension for old versions of Dreamweaver that will add in some XHTML functionality.


I think you may still have to edit some of the tags manually to get the < /> for img tags etc.

For file extensions, don't worry overly about this. You can use .htm,.html,.xhtml with your XHTML files. A proper browser shouldn't worry too much about what file extension is on the end of a file. The extension is used by Windows to know which program to open the file with. (Someone correct me if I am talking cak here!)

You should make sure that you have the correct document declaration at the start of the file before the root tag, for XHTML Transitional:
Code:
<!DOCTYPE html 
     PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot;
     &quot;DTD/xhtml1-transitional.dtd&quot;>
To be fully compliant with standards you should include the following:
Code:
<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
<!DOCTYPE html 
     PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
    &quot;DTD/xhtml1-strict.dtd&quot;>
<html xmlns=&quot;[URL unfurl="true"]http://www.w3.org/1999/xhtml&quot;[/URL] xml:lang=&quot;en&quot; lang=&quot;en&quot;>

Check out the w3c pages on XHTML for the full gen on all this...
--
Dunx
 
Forgot about the server bit:

The server doesn't do anything to your XHTML files unless you have set it up to process .xhtml files with ASP or PHP or something else.

In such cases file extensions do matter!

If your web server is set up as most are, no processing will be done on your xhtml files. --
Dunx
 
Thank you, Dunx!
star.gif
++

I have right DTD and my code is OK, but what makes me crazy that I can't view my .xhtml files normally. I have IE 6.0 which I'm sure have support for XHTML... Can you see .xhtml files with your browsers? If so please post code or link I can check. Thank you!

P.S. When I save files as .htm everything is fine, but I want it to be .xhtml!!! Good Luck! :)
 
I have found that .xhtml files show up fine in IE6 but if they are on your file system you have to tell Windows to use IE to open them (In Windows Explorer Tools>Folder Options then File Types{/b] tab).

I just tried all this and am still getting what you were...

Now I am getting the same thing you were getting. Argh!!!

It seems that if you drop the xml declaration at the start of the document you can use xhtml and the page will work fine. Now, whether that makes the document standards compliant I don't know. It seems that IE uses the file extensions and the declaration to decide what to do with the page, because if you leave the xml declaration in but change the extension to html the page works. Very odd.

Anyone have any idea why this works this way? --
Dunx
 
Thank you Dunx! Now you see that it's really odd... Thanks for the link I'll take a look on it now. Good Luck! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top