From time to time a question like "Is the SAP Portal W3C compliant?" arises in the portal forums. As I have gotten asked by clients the same question several times, I will try to shed light on this topic. The following was tested on EP 7.00 and EP 7.01 and takes only consideres the HTML part, not the CSS and Javascript.
The short answer is: no
The explanation:
For those of you that don't know what W3C compliance means: nowadays it means that the HTML code sent to the browser is at least HTML 4.01 compliant, but in most cases it means that the code has to be XHTML 1.0 compliant.
HTML | http://en.wikipedia.org/wiki/HTML#XHTML_versions | |
XHTML | http://en.wikipedia.org/wiki/XHTML |
This means that the browser is expecting the page to include some content and to follows some standards, like:
DTD | http://en.wikipedia.org/wiki/Document_Type_Declaration | |
| ||
Root element | http://en.wikipedia.org/wiki/XHTML#Root_element | |
| ||
XML declaration | http://en.wikipedia.org/wiki/XHTML#XML_declaration | |
|
Closing (non-)empty elements | |
Improperly nesting elements | |
Quotation marks around attribute values | |
XHTML elements and attributes are case sensitive | |
Using attribute minimization | |
CDATA: refer all script and stylesheet information in the head element. |
To simplify XHTML creation, there are 3 types of XHTML available:
*Source: http://en.wikipedia.org/wiki/XHTML
For every HTML page you should aim to be at least XHTML 1.0 Transitional compliance.
You might think: As long as the browser is showing the information correctly, why be W3C compliant? Once, you can put the W3C compliant image on your site: http://www.w3.org/QA/Tools/Icons. But more important is the fact that W3C compliant means that the same HTML code will get interpreted correctly by all relevant browsers (portability). Upgrading from Firefox 3.5 to 4.0 or from IE7 to IE9 won't be such a high a risk anymore.
The SAP Portal is accessed by browsers that interpret the generated HTML code from the Portal to show the data to the user. If the portal HTML code is XHTML compliant, it doesn't matter if the user is using IE7, Opera, Chrome, Safari or Firefox. As a definition for portal HTML code: the code the portal is generating, not integrated Web Dynpro ABAP, BSP, etc code. As the SAP Portal is also making heavy use of Javascript, being (X)HTML doesn't automatically mean that the functionality will also work across different browsers.
The W3C is offering a validator (http://validator.w3.org/) that check the HTML code of a site and gives you an error report. You can also use web developer plugins for Firefox to analyze the HTML code. I usually use Firebug and HTML validator.
Let's analyze the portal. After an initial log in the user sees the typical default portal:
The W3C Validator is giving me: Failed validation, 151 Errors
The warnings:
The errors:
This goes on and on. Most part of this is caused by the iViews SAP is providing. So you can get rid of these error messages when you develop you own portal applications for TLN, Masthead, etc. Doing so, you will still get the basic HTML errors the portal is always producing. I've written a small example code:
public void doContent(IPortalComponentRequest request, IPortalComponentResponse response) |
{ |
response.write(""); |
} |
This application only writes a standard portal page. Calling this application (http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.example.default) gives me 3 errors:
As this is standard code, you'll always end up in creating non-XHTML compliant code. Curious about this, I checked also the SCN and SAP.com page. I wanted to know if SAP is taking W3C compliance serious or not.
SCN (http://www.sdn.sap.com/irj/sdn😞 201 Errors, 130 warning(s)
But at least they are providing the DOCTYPE: SAP.com (http://www.sap.com/usa/index.epx😞 103 Errors, 4 warning(s)Conclusion:
With the standard portal HTML code generation you won't be able to have a W3C compliant portal. As the framework is already producing incompatible code, there is no easy workaround available.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
9 | |
7 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |