Skip to Content
author's profile photo Former Member
Former Member

Setting the HTML DOCTYPE with WAD?

Does any one know how to set the HTML DOCTYPE for a Web Application Designer template? If you simply put the tag at the top of the page, Bex inserts JavaScript above the manually inserted doctype tag rendering it useless. For example:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"


inserted at the top of the page, gets pushed down to line 54 at runtime due to generated script. Consequently, since the DOCTYPE tag is not line 1, the browsers ignore it.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 03, 2005 at 12:04 AM

    In case some one searches and finds this topic, the answer to the original question is that it is currently not possible to specify a DOCTYPE for a Web Template in BW 3.5/Netweaver 2004 due to what my company considers to be a critical defect. In short, system generated script is inserted at the top of every HTML stream, before any user definable content. There are mechanisms in Netweaver 2004 to resort some tags, but there is no mechanism to resort the doctype into the correct position. Alternatively, there is no mechanism that makes it possible to define a DOCTYPE specification in other way.

    We consider the ramifications of this issue to be critical for several reasons:

    • Violates W3C specification [ISO8879]

    • If CSS styles are used on some tags (such as generated by FrontPage or Dreamweaver), with no DOCTYPE specified, Microsoft Internet Explorer 6.0.x will catastrophically crash.

    You can see full details of this issue in customer Note: 0120025231 0001589955 2005.

    I hope this is of value.

    Best regards,

    Joel Blackthorne

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello Joel,

      thank you alot for your explanations, it is the only topic I can find regarding the DOCTYPE problem. I am facing the same problem as you, i found a more or less related topic here: webelements-custom-html-and-missing-doctype

      One solution would be to change the standard class by:

      1. Creating a new class inheriting from CL_RSR_WWW_ITEM_TEMPLATE

      2. Overload the method RENDER, copy all code and concatenate at the end of the method the DOCTYPE element to the member n_sx_output-string

      3. Adjust the setting of the default template within the table RSRRENDERERATR for the key REN_NAME=CL_RSR_WWW_ITEM_TEMPLATE, ATTR_NAME=NAME. Change the field VALUE from "CL_RSR_WWW_ITEM_TEMPLATE" to the new class.

      This solution should work, but is kind of crappy and the risk for side effects on other renderings is too high.

      I was not able to find the note mentioned in your posting. What does "customer note" mean? Are you still having the problem, what was your workaround?

      Thanks for any replies!

      Regards Felix

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.