xsl-list
[Top] [All Lists]

RE: how to close html tags : link, meta,...

2003-08-13 07:36:57
From: Julian Reschke [mailto:julian(_dot_)reschke(_at_)gmx(_dot_)de]
Sent: Wednesday, August 13, 2003 7:45 AM
Subject: RE: [xsl] how to close html tags : link, meta,...


I don't understand.  I'm it states that all element's in 
the xhtml dtd
that are not declared as empty should have a closing tag.  
Those that
are declared as empty may or may not have a closing tag (in 
other words
may or may not use the empty element syntax).

Nope. It says:

"Elements that are declared in the DTD as EMPTY can have an 
end tag or can
use empty element shorthand (see Empty Elements)."

But <div/>, which is the element Andrew specifically referred to, is *not*
defined as EMPTY in the DTD.  It should not be written minimized.

Because it doesn't matter for XML?

Nor do a lot of features, but they are here and being used everyday.
Saying 'it doesn't matter for xml' is being very short sited.

But after all you *are* using XSLT's XML output method. An in XML, it
doesn't matter. An application that claims compliance to the 
XML spec (such
as an XHTML browser) MUST accept both notations.

XSLT 1.0 processors don't do XHTML.  You can have XML (with some
inappropriate element minimizations) or HTML (which is not well-formed).
This is a limitation of the current spec which XSLT 2.0 should correct,
since it will allow for XHTML output.

It wouldn't break anyone's output, it would merely help 1000's
(probably
much more) of xslt'ers.  I simply cannot understand 
anyone arguing
against the addition of this.  Even the xml spec states that its
optional...
(http://www.w3.org/TR/1998/REC-xml-19980210#sec-starttags).

It would help for people that try to feed XHTML into 
non-XHTML compliant
browsers. Why do you try this in the first place?

I give up....

Again: it's known that IE does not support XHTML. Why don't 
you simply serve
HTML instead?

The W3 site serves conformant XHTML.  IE has no trouble with it, at least my
version (5.5).  An XSLT 1.0 processor is not the right tool to use if you
want fully-conformant XHTML.

cheers,
b.

| brian martinez                           
brian(_dot_)martinez(_at_)cendant(_dot_)com |
| lead gui programmer                                    303.357.3548 |
| cheap tickets, part of trip network                fax 303.357.3380 |
| 6560 greenwood plaza blvd., suite 400           englewood, co 80111 |
| cendant travel distribution services   http://www.cheaptickets.com/ |

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list