Sign in to follow this  

[web] On XHTML

This topic is 4529 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I was looking a couple of minutes ago the "redesign gamedev frontpage - no tables" thread, and I have to say once I looked at Etnu's and Sander's "entries" (well, seems like noone cared anymore), and I was like what the hell? I mean, they are amazing. I first thought the contest was meant to force people to use some weird "hacks", but it comes out you can achieve an amazing, good looking website with XHTML+CSS, which brings me to the start of this topic... While, I know XHTML=HTML+XML, and basically the only thing that changes is syntax (all tags must be closed, all tags in no-caps - basically a well formed and valid xml document), right. But what I want to ask is 1. Are there any freely available XHTML WYSIWYG editors? In the case not, what can I use? An XML editor that validates XML (and Id have to pass the XHTML DTD I guess), and what free tools ae at hand? Id like to know what tools did Etnu or Sander use to make their submisions... So far, Ive used Altova XML Spy to work with a cocoon project at collegue, and It was amazingly good for creating the XSLTs visually, however, my trial expired and the "Personal" version plainly sucks (looking at the comparison table in the website). A tool I recently found was Butterfly XML but unfortunately is very slow in my machine (the app is java-based)... Is dreamweaver able to WYSIWYG-edit XHTML documents? 2. What are the cross-browser issues I should be aware of? What browsers do support the latest XHTML standard (1.0 IIRC)? 3. Any other recommended tools, websites (I already read the Forum FAQ, and the sticky) Thanks for your time, cheers

Share this post


Link to post
Share on other sites
You could always write the XHTML documents by hand [smile] That's what I do.

One of the main cross-browser issues is that XHTML pages are supposed to be served as application/xhtml+xml and NOT text/html. IE, however, does not support the application/xhtml+xml MIME so it's necessary to either server the page incorrectly (preventing the use of an XML parser on browsers that do support that MIME) or use something like PHP to ensure that pages are served correctly for browsers that support it.

Share this post


Link to post
Share on other sites
I write my websites by hand. No WYSIWYG. I used HTML-Kit from chami.com to write it. Now, to your questions:

1) There are no good one's that I know of. WYSIWYG and good XHTML-CSS webdesign are hard to reconcile. It takes a lot of knowledge that's hard to capture in programming logic.

2) All browsers support XHTML 1.0 when you leave a space before the slash in a self-closing tag (i.e. <br /> instead of <br/>). Just beware not to use the XML declaration tag on top of documents (that will forec IE in quirksmode). As for the rest: Develop in a good browser like FireFox and than apply some tiny hacks to make IE obey you. Don't do it the other way around. Expect IE to hate you a lot. Check out sites like css-discuss's wiki for good information about making IE behave.

3) Aside from my HTML editor & ftp program, I rely on Paint Shop Pro to do the imaging for me. Make use of (transparent) PNG's for your site. Either don't care about IE and it's bugs with them, or apply some tiny jacascript to fix the transparency issues. Also, get a proper javascript debugger.

Share this post


Link to post
Share on other sites
As an added note, make use of Firefox's DOM Inspector. It has bugs but it can help you a lot when working out weird layout mishaps. It's also helpful when you are trying to mimic another site's design.

Share this post


Link to post
Share on other sites
Well, thank you guys for the replies.

Quote:
Original post by Sander
I write my websites by hand. No WYSIWYG.

Thats recomforting, I thought you might have used a $$$ app

Quote:
Original post by Sander
I used HTML-Kit from chami.com to write it

Do you use the personal edition? Because I wonder if the "addons" you get by buying the product are good enough to buy it (not that I have the money though).

Quote:
Original post by Sander
All browsers support XHTML 1.0 when you leave a space before the slash in a self-closing tag (i.e. <br /> instead of <br/>). Just beware not to use the XML declaration tag on top of documents (that will forec IE in quirksmode). As for the rest: Develop in a good browser like FireFox and than apply some tiny hacks to make IE obey you. Don't do it the other way around. Expect IE to hate you a lot. Check out sites like css-discuss's wiki for good information about making IE behave.


"A good browser like firefox". Thats right. I use firefox 24/7. And I unistall IE with every new windows installation. However, I know 99.99% of world population still uses IE, so I guess I have to somehow test my site in IE too...
I wish you should have bookmarked that website with the PC "farm" to test a website in several browsers and get the screenie back...

Quote:
Original post by Sander
get a proper javascript debugger.

In the past, Ive used the Tools->javascript Console. Will that one suffice or do you have a better suggestion?

Quote:
Original post by Invader X
One of the main cross-browser issues is that XHTML pages are supposed to be served as application/xhtml+xml and NOT text/html. IE, however, does not support the application/xhtml+xml MIME so it's necessary to either server the page incorrectly (preventing the use of an XML parser on browsers that do support that MIME) or use something like PHP to ensure that pages are served correctly for browsers that support it.

Nice to know about that MIME issue

Quote:
Original post by Invader X
As an added note, make use of Firefox's DOM Inspector. It has bugs but it can help you a lot when working out weird layout mishaps. It's also helpful when you are trying to mimic another site's design.

Never heard of it before, will give it a shot.

Totally Offtopic, Invader X, your website seems to have some parsing errors
Quote:

Warning: main(cms-settings.php): failed to open stream: No such file or directory in /home/clients/invader/public_html/core-classes/db-class.php on line 17

Fatal error: main(): Failed opening required 'cms-settings.php' (include_path='.:/usr/lib/php:/usr/lib/php/php') in /home/clients/invader/public_html/core-classes/db-class.php on line 17

No longer maintained? hehe

Share this post


Link to post
Share on other sites
This is somewhat unrelated, but if you serve your xhtml files as content type application/xhtml+xml, Mozilla (i.e. Firefox too) will parse them using its xml parser instead of its HTML parser (which it will use, regardless of document type declaration, if they are served as text/html)

The reason that having your xhtml documents parsed with the Mozilla XML parser, is that they will be checked for well-formedness. This means errors immediately show up.

As a side effect, javascript document.write() and element.innerHTML won't work (because those could cause the document to become badly formed, and that's not allowed)

It may be useful, during development, to set the content type like this to check for well-formedness.

But don't do it in production.

Other web browsers (IE, opera, etc) don't recognise this content type, and won't display the file at all.

Mozilla has two parsers, HTML and XML - which are distinctly different, because the HTML one allows badly formed XML documents. The HTML parser has two modes (at least), standards compliance and "quirks".

If you are making a new web site, ensure that it works in standards-compliance mode (you can do this by specifying either the XHTML namespace, or a HTML 4 declaration I think)

Mark

Share this post


Link to post
Share on other sites

This topic is 4529 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this