We ensure that our standard XHTML templates, XSL, style sheets and all modules are XHTML and CSS compliant "out of the box".
Composite allow you to build a site that conforms to the W3C XHTML 1.0 standard. This is possible since you as the developer have near full control over all the XHTML that is generated by Composite. The only part you can’t totally control is the XHTML generated when the users use the WYSIWYG editor, but you can configure the site so that you know it will be XHTML.
In this walkthrough we will cover all the bases needed to get XHTML compliant output from Composite.
This step is straight forward – XHTML is “turned on” by default in the WYSIWYG editor. You can verify that this is the case by editing the sites configuration file and check that the “htmlcontenttransform” is set to “XHTML”.
If you have an existing site containing a lot of page content that is HTML based, you need to convert this into XHTML. Contact Composite Netsystems to obtain a conversion tool that can transform Composite HTML page content into XHTML.
Browse to the Templates fan and work through each HTML template, ensuring it is XHTML. We wont get into details about the actual layout of XHTML here – see the W3C XHTML recommendation for details. In short, XHTML is a reformulation of HTML 4 in XML, meaning that the tags allowed in HTML 4 is allowed in XHTML, but XHTML must also adhere to the rules of XML.
The templates should of cource contain the following at the beginning:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
The default templates generated by Composite are XHTML compliant.
Browse to the Datamap fan, locate the “Data Query XSL Definitions” plug-in and check each Identifier. Chances are about 99% that your XSL is already producing perfect XHTML, but if you use tags line BLINK, which is not proper XHTML, you need to take care of that.
XSL that is part of a Composite module will generate a XHTML compliant output.
If your site features any ASP.NET User Controls, ensure that they all return correct XHTML.
Use a tool like the W3C Markup Validator to check that your site is XHTML. You could actually just ignore step 3 and 4, and use the validator to do the checking for you.