1
Bassman
W3C XHTML compliance?
  • 2004/11/8 4:35

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


i'm in the process of doing a theme, and I checked the HTML for compliance with the Top Style Pro 3 checker (which uses the W3C validation service. The theme trips up in a lot of places like this:
Quote:

Line 2, column 53: character "<" is the first character of a delimiter but occurred as data

...p://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_lang

If you wish to include the "<" character in your output, you should escape it as "<". Another possibility is that you forgot to close quotes in a previous tag.


The actual line is
Quote:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>" />


Is there something I should be doing to avoid this, so it validates properly?

2
astonstreet
Re:W3C XHTML compliance?

The smarty code wont validate... but smarty will turn the code into html in your browser. It doesnt matter if that line in your theme doesnt validate, it only matters if it validates after smarty turns it into html.

If you try to validate the theme.html with the smarty code there will be heaps of errors, you need to validate what smarty outputs from the theme.

hope I make sense

3
Dave_L
Re:W3C XHTML compliance?
  • 2004/11/8 5:39

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


Hmmmm ...

Maybe you should only run the validator on the HTML output, and not on the source files, which contain Smarty code.

A web browser is only going to see the HTML output anyway, so that's where the validation matters.

4
Anonymous
Re:W3C XHTML compliance?
  • 2004/11/8 8:37

  • Anonymous

  • Posts: 0

  • Since:


If you want to fix another error too (posted this already to sf). In six files there is wrong doctype declaration. Search the complete XOOPS code for:

//W3C//DTD XHTML 1.0 Transitional//EN


and replace with (where the stroke is missing before the slashes):

-//W3C//DTD XHTML 1.0 Transitional//EN

5
Bassman
Re:W3C XHTML compliance?
  • 2004/11/8 8:44

  • Bassman

  • Friend of XOOPS

  • Posts: 1272

  • Since: 2003/5/23


Cool, thanks guys.

6
tjnemez
Re:W3C XHTML compliance?
  • 2004/11/8 10:03

  • tjnemez

  • Home away from home

  • Posts: 1594

  • Since: 2003/9/21


hey bassman are you using firefox with web developer extension. its a great tool for validating your site. i use it on my test site and no problem validating the theme on the fly. see here: Test Site

for anyone who is interested you can check out extension here:http://update.mozilla.org/extensions/moreinfo.php?id=60&vid=645

7
JMorris
Re:W3C XHTML compliance?
  • 2004/11/8 12:52

  • JMorris

  • XOOPS is my life!

  • Posts: 2722

  • Since: 2004/4/11


Another great extension for Firefox is Checky.

Author Description:
Quote:
Easy to use interface to many free and commercial Online Validation and Analysis Services. Validate and analyse HTML, XHTML, CSS, RDF, RSS, XML, WAI, Section 508, P3P, Hyperlinks, Metadata and many more. Adds a context and tools menu.


URL:http://update.mozilla.org/extensions/moreinfo.php?id=165&vid=295

Login

Who's Online

163 user(s) are online (105 user(s) are browsing Support Forums)


Members: 0


Guests: 163


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits