Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

<!-- Published by ... -->

This is causing problems for me with IE6 because it's appearing before my DOCTYPE; is there any way to tell CityDesk where to put this thing, or to suppress it entirely?

Austin Ziegler
Friday, November 01, 2002

There was something in an earlier thread about this that has now disappeared or been archived.

I don't know the answer to your problem but does this affect you working on the site with IE 6 or someone viewing it with IE 6?

Mark S.
Saturday, November 02, 2002

Me working on the site with IE6. I'm using Mozilla as the development "platform", but I check it against IE6 and Opera6 before uploading.

I've already decided that I'll be adding this sort of transformational functionality to RTidy/CityDesk -- I just have to figure out how I want to configure it.

Austin Ziegler
Sunday, November 03, 2002

many threads where spent on it. It is legal HTML, but annoying for some special things (like php scripts on the server). The problem is usually in something else. If you want to be sure, preview on local system; edit the generated file (in %temp%\citydesk_???? (find out what to fill in at the ? marks) and delete the comment. Won't make a difference I expect

Adriaan van den Brand
Monday, November 04, 2002

Actually, I can say with certainty that it's the comment which is causing the difference -- because I removed it and IE6 displays the page correctly (or at least as correctly as IE6 will do in the first place). I suspect that it's a complex confluence of tag soup -- I'm validating as XHTML 1.0 Strict (no <?xml?> decl because IE6 chokes on that) and I don't think that XHTML allows a comment before the doctype.

-austin

Austin Ziegler
Monday, November 04, 2002

If you want to play it strict NOTHING is allowed before the !doctype according to W3C. This 'tag' is used to determine whether the browser shall use the old 'faulty' way of interpretating or should use the newest set up.

Jorgen Brenting
Tuesday, November 05, 2002

w3c: There must be a DOCTYPE declaration in the document prior to the root element. If present, the public identifier included in the DOCTYPE declaration must reference the DTD found in Appendix C using its Formal Public Identifier. The system identifier may be modified appropriately.

This does not exclude comments or define that it needs to be the first. e.g.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

is a valid w3c example.

Adriaan van den Brand
Tuesday, November 05, 2002

Austin, can you give us a URL for 2 versions: with/without <!-- published by --> comment ?

Adriaan van den Brand
Tuesday, November 05, 2002

Adrian is right – there may be a comment before the doctype element, but ONLY one of these two:
<?xml version="1.0"?> or
<?xml version="1.0" encoding="UTF-8"?>
... and only if the document does not contain deprecated items nor frames.
I think this is potentially dangerous stuff since it could lead to troubles for CD documents in newer browsers if the CD-published-by tag can't be avoided in some way.

Jorgen Brenting
Tuesday, November 05, 2002

I could find the <!-- ---> in XHTML specs. I did look it up for HTML 4.0 once and could find conflicts with my knowledge in the XHTML standard. But IMHO, CD is not a good XHTML generator...

I expect this problem to be solved in CD2.0. The comment style is selected (only for html and may be asp) as a 'safe' way of imprinting CD html. But then, professional html editors don't do this. I'm perfectly happy to specify the generator meta tag in the html head.

Let's all hope it is gone in CD2.0!

Adriaan van den Brand
Tuesday, November 05, 2002

So what's the bottom line here - I'm new and having a hard time following this.

If I use IE 6 at design time is something messed up?

If a user views a CD site is something messed up?

Thanks.

Mark Singletary
Tuesday, November 05, 2002

I don't know if this is the bottom line Mark, but I think it works this way:
The !Doctype declaration won't be seen by the newest browsers if it is not the first line (with the exceptions mentioned above). The document therefore will be treated as a transitional one i.e. an old document. This should not give any problems here and now unless it is vital for the document to be interpreted as a strict document following all the newest rules. But as browsers are drifting towards more strict behaviour (at last) it may be something to consider in the future.

Maybe someone at Fog Creek should comment on this.

Jorgen Brenting
Wednesday, November 06, 2002

Sorry -- because fog creek doesn't let me view the CD Forum in frames, I don't always remember to make it to visit the CD Forum on a daily basis.

The difference between the two pages is actually rather small, but:

http://www.halostatue.ca/with-comment.jpg
http://www.halostatue.ca/without-comment.jpg

As you go through my site with IE, you'll notice that certain pages look correct -- those are handmade HTML pages. The ones that are wrong are the ones with the comments.

Mozilla isn't bothered by the comment (or at least it doesn't affect parsing), but it's still something that I'm going to have to take care of at least on my own site.

-austin

Austin Ziegler
Thursday, November 07, 2002

Duh. My "recursive Tidy" program, RTidy/CD, already handles stripping these comments because Tidy supports stripping these comments.

If you're using RTidyCD, set <hide-comments value="yes"> instead of the default <hide-comments value="no"> and it will eliminate all comments, including the <!-- Published by ... --> comment.

-austin

Austin Ziegler
Monday, November 11, 2002

*  Recent Topics

*  Fog Creek Home