RE: HTML or XHTML - why do you use it?

Hi,

You could simply do something like

<xsl:output
  encoding="utf-8"
  method="html"
  indent="yes"
  doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>

<xsl:template match="node()|@*">
  <xsl:copy>
    <xsl:copy-of select="@*"/>
    <xsl:apply-templates/>
  </xsl:copy>
</xsl:template>

And then catch any non-standard elements and override the default identity
template:

<xsl:template match="abbr">
  <span class="abbr">
    <xsl:apply-templates/>
  </span>
</xsl:template>

But, it is hardly an optimal solution to rely only on the sematics as defined by
XHTML.

best,

                                 Robert Koberg
                                liveSTORYBOARD
                                 San Francisco

> -----Original Message-----
> From: www-html-request@w3.org [mailto:www-html-request@w3.org]On Behalf
> Of Nick Boalch
> Sent: Wednesday, January 08, 2003 3:42 PM
>
> Peter Foti (PeterF) wrote:
>
> >> So you want HTML syntax and processing rules, and you want UAs to
> >> treat the markup as HTML. Why not just use HTML?
> >
> > Because I want the benefits of using XML tools and validators.  Not to
> > mention the experience of writing valid XML.
>
> This suggests the obvious step of working in XHTML and deploying an XSL
> stylesheet to transform it into valid HTML as required.
>
> I /bet/ someone has already done this.
>
> Cheers,
>
> N.
>
> --
> Nick Boalch                          <URL:http://users.durge.org/~nick/>

Received on Wednesday, 8 January 2003 18:58:41 UTC