HTML validation failure with DTML-renders -- ends tag with />
I tried validating Zope's HTML for the first time and I have come across something strange... Zope inserts '/>' as the close, instead of just '>' for the automatic '<img src...' created when calling an image with DTML. Here is my code just to make sure I am not doing something stupid. bullet is a .gif. <dtml-var bullet> renders... <img src="zope/bullet" alt="" height="14" width="13" border="0" /> It also seems to do this for SiteRoot's insertion into the header. <base href="http://www.myzope.com/folder/folder/" /> -Trevor
From: "Trevor Toenjes" <zope@toenjes.com>
Zope inserts '/>' as the close, instead of just '>' for the automatic '<img src...' created when calling an image with DTML.
There are other places zope does this, and CMF.... what I found is that for some things (like <BR/>) putting the /> breaks Netscape 4.x ... so I've been taking the />'s back out :(
marc lindahl wrote:
From: "Trevor Toenjes" <zope@toenjes.com>
Zope inserts '/>' as the close, instead of just '>' for the automatic '<img src...' created when calling an image with DTML.
There are other places zope does this, and CMF.... what I found is that for some things (like <BR/>) putting the /> breaks Netscape 4.x ... so I've been taking the />'s back out :(
<BR /> (space between the R and /) is a work-around that has worked for me. -- Jim Washington
This is "the Right Thing to do"(tm). The trailing slash is a necessity to make it validate as XHTML, which incidentally is the w3c's current recommendation for HTML markup. - And the only one that will be expanded in the future. - but i might agree... - there should probably be a switch to toggle it off, if you insist on creating old-school HTML4 (or godforbid 3.2!) on or about, Monday, October 01, 2001, we have reason to believe that Trevor Toenjes wrote something along the lines of : TT> I tried validating Zope's HTML for the first time and TT> I have come across something strange... TT> Zope inserts '/>' as the close, instead of just '>' TT> for the automatic '<img src...' created when calling an image with DTML. TT> Here is my code just to make sure I am not doing something stupid. TT> bullet is a .gif. TT> <dtml-var bullet> TT> renders... TT> <img src="zope/bullet" alt="" height="14" width="13" border="0" /> TT> It also seems to do this for SiteRoot's insertion into the header. TT> <base href="http://www.myzope.com/folder/folder/" /> TT> -Trevor -- Geir Bækholt web-developer/zopatista geirh@funcom.com funcom oslo | webdev-team <!-- PGPid : 0x90B47B20 -->
This is "the Right Thing to do"(tm).
The trailing slash is a necessity to make it validate as XHTML, which incidentally is the w3c's current recommendation for HTML markup. - And the only one that will be expanded in the future.
- but i might agree... - there should probably be a switch to toggle it off, if you insist on creating old-school HTML4 (or godforbid 3.2!)
Interestingly, the HTML W3C validator fails the end tag. And does not mention it might be XHTML. It doesnt seem to break the browsers I am testing, so I will ignore it until I learn XHTML. -next week. ;) But, to address your toggle idea as a techno newbie. If you could set a namespace or SiteAccess/HostMonster space to the CONTENT-TYPE or ISO-XXX, then Zope would render based on this property. This would require additional render libraries for Zope, but might open it to support different standards. Thanks, -Trevor
From: "Trevor Toenjes" <zope@toenjes.com>
But, to address your toggle idea as a techno newbie. If you could set a namespace or SiteAccess/HostMonster space to the CONTENT-TYPE or ISO-XXX, then Zope would render based on this property. This would require additional render libraries for Zope, but might open it to support different standards.
The other way you could look at it: You can set the DOCTYPE in standard_html_header, and that should dictate how the browser interprets your tags. It certainly affects how the w3c validator looks at them. E.g.: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
Using /> is compliant with XHTML. Andreas ----- Original Message ----- From: "Trevor Toenjes" <zope@toenjes.com> To: <zope@zope.org> Sent: Monday, October 01, 2001 00:18 Subject: [Zope] HTML validation failure with DTML-renders -- ends tag with />
I tried validating Zope's HTML for the first time and I have come across something strange...
Zope inserts '/>' as the close, instead of just '>' for the automatic '<img src...' created when calling an image with DTML.
Here is my code just to make sure I am not doing something stupid. bullet is a .gif.
<dtml-var bullet> renders... <img src="zope/bullet" alt="" height="14" width="13" border="0" />
It also seems to do this for SiteRoot's insertion into the header. <base href="http://www.myzope.com/folder/folder/" />
-Trevor
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (5)
-
Andreas Jung -
Geir B�kholt -
Jim Washington -
marc lindahl -
Trevor Toenjes