Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6055867
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:18:45+00:00 2026-05-23T08:18:45+00:00

I am getting an error on theme_tests.html page provided with syntaxhighlighter_3.0.83 , which I

  • 0

I am getting an error on theme_tests.html page provided with syntaxhighlighter_3.0.83, which I wasn’t getting earlier.
The error is A DOCTYPE is not allowed in content at <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> inside first script tag <script id="sample" type="text/plain"> tag.

Here is the page theme_tests.html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>SyntaxHighlighter Theme Tests</title>
    <script type="text/javascript" src="/js/jquery-1.4.2.js"></script>
</head>

<body>

<div id="output"></div>

<style>
body {
    background: white;
    font-family: Helvetica;
}

.test-wrap {
    width: 100%;
    height: 800px;
    overflow: auto;
    border: none;
}
</style>

<script id="sample" type="text/plain">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>SyntaxHighlighter Theme Tests</title>
    </head>

    <body>
        &lt;script>
        /**
         * Looks for a child or parent node which has specified classname.
         * Equivalent to jQuery's $(container).find(".className")
         * @param {Element} target Target element.
         * @param {String} search Class name or node name to look for.
         * @param {Boolean} reverse If set to true, will go up the node tree instead of down.
         * @return {Element} Returns found child or parent element on null.
         */
        function findElement(target, search, reverse /* optional */)
        {
            if (target == null)
                return null;

            var nodes           = reverse != true ? target.childNodes : [ target.parentNode ],
                propertyToFind  = { '#' : 'id', '.' : 'className' }[search.substr(0, 1)] || 'nodeName',
                expectedValue,
                found
                ;

            // main return of the found node
            if ((target[propertyToFind] || '').indexOf(expectedValue) != -1)
                return target;

            return found;
        };
        &lt;/script>

    </body>
    </html>
</script>

<script type="text/javascript">
var themes = [
        ['#fff', 'Default'],
        ['#000', 'Django'],
        ['#fff', 'Eclipse'],
        ['#000', 'Emacs'],
        ['#000', 'FadeToGrey'],
        ['#000', 'MDUltra'],
        ['#000', 'Midnight'],
        ['#000', 'RDark']
    ];

$(document).ready(function()
{
    var sample = $('#sample').text().replace(/</g, '&lt;');

    $.each(themes, function(index)
    {
        var $iframe = $('<iframe class="test-wrap" src="about:blank" />'),
            background = this[0],
            themeName = this[1]
            ;

        $('#output')
            .append(''
                + '<h1>'
                    + '<a href="#theme' + (index + 1) + '">next</a> '
                    + '<a name="theme' + index + '">'
                        + themeName
                    + '</a>'
                + '</h1>'
            )
            .append($iframe)
            ;

        $iframe.ready(function()
        {
            var doc = $iframe[0].contentDocument;
            $iframe.css('background', background);

            doc.write(''
                + '<scr' + 'ipt type="text/javascript" src="/sh/scripts/XRegExp.js"></scr' + 'ipt>'
                + '<scr' + 'ipt type="text/javascript" src="/sh/scripts/shCore.js"></scr' + 'ipt>'
                + '<scr' + 'ipt type="text/javascript" src="/sh/scripts/shBrushXml.js"></scr' + 'ipt>'
                + '<scr' + 'ipt type="text/javascript" src="/sh/scripts/shBrushJScript.js"></scr' + 'ipt>'
                + '<link type="text/css" rel="stylesheet" href="/sh/styles/shCore' + themeName + '.css"/>'
                + '<pre type="syntaxhighlighter" class="brush: js; html-script: true; highlight: [5, 20]" title="This is SyntaxHighlighter theme ' + themeName + ' in action!">'
                    + sample
                + '</pre>'
                + '<pre type="syntaxhighlighter" class="brush: js; html-script: true; collapse: true">'
                    + sample
                + '</pre>'
                + '<scr' + 'ipt type="text/javascript">'
                    + 'SyntaxHighlighter.highlight();'
                + '</scr' + 'ipt>'
                );
            doc.close();
        });
    });

    $('#output a[name]:first').attr('name', 'top');
    $('#output a[href]:last').attr('href', '#top').html('top');
});
</script>

</body>
</html>

The web page page I have in my java web application is rendering alright in chrome but not on firefox 4.
I remember the same page in my application used to work alright on both browsers before.

Only changed I have done to my system ever since I saw my application rendering the same page properly are:

  1. I added jquerywtp1.10 plugin to my eclipse 3.5 IDE.

  2. Updated firefox to firefox 4 version.

Could someone help me understand what should I do to get the same web page properly displayed on mozilla firefox 4 as well?

This is where I am getting the error, on line number 29: http://programatori.evonet.ro/images/1308360109285/doctype.jpg

theme_tests.html is could be found at: https://bitbucket.org/alexg/syntaxhighlighter/src/a8771a7fc81d/tests/theme_tests.html

Could someone enlighten me for how to do away with this error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T08:18:46+00:00Added an answer on May 23, 2026 at 8:18 am

    You have declared the document to be a XHTML strict document. However, the document structure violates the doctype rules. Nesting another <!DOCTYPE in the document is illegal. Also putting the JS code with unescaped XML entities in a XHTML strict document is illegal. Learn about doctypes at http://hsivonen.iki.fi/doctype and validate your document against the http://validator.w3.org.

    Your first step is to wrap that nested XHTML document in a <![CDATA[ block and move all that JS out into its own .js file. Also, having the <style> without type attribute outside the <head> is illegal.

    This problem has nothing to do with JSP. It’s just basic (X)HTML knowledge.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I stripped this down to the bare essentials: <!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
I have a unit test with moq in which I am getting an error
I'm getting error: Unrecognised selector sent to instance, upon inspection, I see there is
I am getting this error when trying to merge TFS2008. There are no pending
I've been getting these messages in apache error.log for quite a while: [client 217.197.152.228]
Why am I getting these errors? alt text http://img39.imageshack.us/img39/2203/help.tif It says: Error: Request for
getting error while try to start service
I am getting error trying to run my asp code for executing stored proc.
I wrote following code...but i am getting Error like: Error 1 'LoginDLL.Class1.Login(string, string, string)':
hi im new to c# and was trying to code but getting error can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.