homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
Forum Library, Charter, Moderator: open

WYSIWYG and Text Code Editors Forum

XHTML in Dreamweaver
No more false PHP positive

10+ Year Member

Msg#: 42 posted 5:14 am on Jan 19, 2002 (gmt 0)

Firstly, hi everyone. First post and stuff... :)

For a while now, I've been frustrated at the way Dreamweaver 4 handles XHTML documents, including its tendency to think that the XML declaration at the top of each document is a PHP tag.

Well, it seems as if I've found a way around it, and it's so simple I literally kicked myself for not seeing it earlier. To prevent DW4 from choking on the XML declaration, simply add comments around it, like this:
<!-- <?xml version="1.0"?> -->
After doing this, I thought, "hmm, I wonder if this will validate properly, though?" and went to the W3C's validator page. To my surprise, my page validated as XHTML 1.0 Transitional. (It validated before I added the comments, too).

This has certainly made the wait for Dreamweaver 5 a lot easier! Now I can properly see my page in DW4 without those yellow error tags everywhere, and only need to correct things such as <br /> and <img /> tags (which Dreamweaver doesn't add the end slash to).



WebmasterWorld Senior Member tedster us a WebmasterWorld Top Contributor of All Time 10+ Year Member

Msg#: 42 posted 3:00 pm on Jan 19, 2002 (gmt 0)

Welcome to Webmaster World, Zaccix. And thanks for a helpful observation.


10+ Year Member

Msg#: 42 posted 3:02 am on Feb 24, 2002 (gmt 0)

Thanks for the commenting tip!

At this site: [desiremedia.com...]

you can download a set of Configuration files for Dreamweaver 4 which are tweaked to write XHTML.

They are pretty good for things lkike the closing slash in empty elements like <img />.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / WYSIWYG and Text Code Editors
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved