Re: [xsl] generating xhtml with msxml3

Subject: Re: [xsl] generating xhtml with msxml3
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 8 May 2001 12:05:49 -0600 (MDT)
Paul Bryant <gap66> wrote:
> I'm trying to generate w3 compliant xhtml
> [...]
> 1) if xsl:output is set to 'html'

Right there is your problem. The 'html' output method is not intended for 
producing XHTML, period. It produces HTML (4.0, by default).

The 'xml' output method is appropriate, though you won't be able to fully
control the output, such as if you intend to produce XHTML that follows
the compatibility guidelines for non-XHTML aware HTML user agents.

The kind of XHTML produced by the 'xml' output method should validate, as
long as your result tree was constructed appropriately.

> 2) With the output set to xml I can get round the above problem but get an
> xml processing instruction as the first line - which also compromises the
> w3 xhtml spec - doctype should be the first tag.

<?xml version="1.0"?> with or without an encoding declaration is not a
processing instruction, so stop calling it that. It just has a similar
syntax. It is, in an XML document, an 'XML declaration' and it might also
contain a standalone declaration. In a general entity (something you
might reference with &foo;) it is known as a 'text declaration' and
cannot have a standalone declaration in it.

And its inclusion is most certainly is not compromising any W3C spec!
XHTML is XML, and all XML docs can have an XML declaration. And it is
never something that would be in a DTD.

   - Mike
_____________________________________________________________________________
mike j. brown, software engineer at  |  xml/xslt: http://skew.org/xml/
webb.net in denver, colorado, USA    |  personal: http://hyperreal.org/~mike/

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


Current Thread