On 26.08.2004 20:07, Gertjan Klein said the following:
Denver Braughler wrote:


Gertjan Klein wrote:


AFAIK, the CSP engine is perfectly capable of sending XHTML

But it does not generate XHTML.


You were talking about the cspbind and other predefined tags then?
They don't even generate valid HTML, and I never use them. It would be
nice if these tags did some kind of doctype sniffing and adjusted
their output accordingly. If you meant "upgrading" in that sense, then
I agree -- but only if they also support valid html as well.

Surprise! Here is devchange MXT615 excerpts (which is in 5.1 only):

<MXT615>
KEY:  MXT615

BRIEF DESCRIPTION: XHTML support for CSP

EXTERNAL DOCUMENTATION:
A DOCTYPE that appears in a CSP file will be analyzed to see if the page is an XHTML file or strict HTML 4.x file. In that case any code generated by CSP will be XHTML or strict HTML 4.x compliant. Note that the strict XHTML DOCTYPE is both XHTML and strict. Even if the CSP page does not have the XHTML DOCTYPE, the CSP code will be HTML 4.01 compliant where no incompatability is possible.


Code that is generated for CSPBIND, #server and #call will by default use
<script type="text/javascript" language="JavaScript">
to handle both HTML 4.0 and older browsers. If the DOCTYPE specifies strict HTML 4 or XHTML use
<script type="text/javascript">


...
Any code generated by Cache built-in rules (in particular CSPBIND and search) is modified to be XHTML and/or HTML 4 compliant as follows:


-- Use lower case names for elements, attributes and HTML defined attribute values.

-- Quote all attributes with " quote character.

-- Make correct nesting for HTML 4.0. For XHTML (based on DOCTYPE) also make sure that empty tags that we generate are closed.

-- For XHTML (based on DOCTYPE) do not use minimized boolean attributes. For example, use checked="checked" not just checked attribute.

-- For XHTML (based on DOCTYPE) put contents of the script tag in CDATA section.

</MAXT15>

...

Gertjan.


Regards, Timur


P.S.

Sorry for this infinite advertisements of all this nifty changes in 5.1. Yes, it rocks in many areas.



Reply via email to