Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Validation of SS file


6 Posts   5708 Views


3 June 2008 at 1:02pm Community Member, 19 Posts

Hi all,

I am a student and for quality assurance part of my project i need to have code validation.
Could any one suggest me how can i can get validate my ss files?

I tried with W3C validator but it gives error when ss code comes e.g. <% base_tag %>
Is it possible for any one to check & validate my code & suggest me if i am making some mistakes?


3 June 2008 at 1:32pm Community Member, 7 Posts

Wh yare you trying to validate the template code before it is parsed?

Shouldn't you be validating the html/css that is being sent to the broswer... ie the html source of


3 June 2008 at 4:23pm Community Member, 19 Posts

Hi Ian

I had tried with source code also but it gives errors like;

# Line 6, Column 49: end tag for "base" omitted, but OMITTAG NO was specified.

    <base href="http://localhost/site_mimomax/" >

You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".
# Info Line 6, Column 4: start tag was here.

    <base href="http://localhost/site_mimomax/" >

Is it b'cuz i have not hosted my site & it's not localhost?
Does localhost creates errors?


3 June 2008 at 4:57pm (Last edited: 3 June 2008 4:59pm), Community Member, 7 Posts

This has nothing to do with localhost. The error message is telling you that the 'base' element is not closed.

With xhtml, all tags (eg <div>) need to be closed (eg </div>). You can have self closing tags, which look like this <img src="something.jpg" />.

The base tag should be self closing... ie <base href="http://localhost/site_mimomax/" />

Note the slash at the end of the tag (in blue).

FYI, my SS instance (2.2.2) is producing valid XHTML (my doctype is 1.0 Transitional)


4 June 2008 at 10:17am Community Member, 19 Posts

Hi Ian

Thanks a lot for your co-operation. I still have some doubts. In my view source it comes like;
<html lang="en" >

While in my C:\wamp\www\site_mimomax\tutorial\templates\ file it's like;

<!--<?xml version="1.0" encoding="UTF-8"?>-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns="" xml:lang="en" >

How it changes to HTML while it's XHTML in file?

Right now i have <!---xml ---> statment in only one file do i need to declare it in of layout folder also and same in all the .ss file of my layout folder?

Can you guide me further more?

How can i close <% base_tag %> tag? In tutorial 1 I didn't find any clue how to close it. I tried with <% base_tag % /> & < / % base_tag %> but it comes as text on html page.


15 July 2008 at 6:27pm Forum Moderator, 921 Posts

I believe you can manually assign the href to the base tag, such as:

<base href="$BaseHref"></base>

instead of ... <% base_tag %>