W3C home > Mailing lists > Public > www-html@w3.org > January 2003

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

From: Robert Koberg <rob@koberg.com>
Date: Wed, 8 Jan 2003 15:56:39 -0800
To: "Nick Boalch" <nick@fof.durge.org>
Cc: <www-html@w3.org>
Message-ID: <ADECJLDNBFNBOJBLKCMOEEJDDPAA.rob@koberg.com>

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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:54 GMT