This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: output XHTML header
- From: Mike Brown <mike at skew dot org>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 26 Jun 2002 17:15:59 -0600 (MDT)
- Subject: Re: [xsl] output XHTML header
- Reply-to: xsl-list at lists dot mulberrytech dot com
Ingo Weiss wrote:
> I am (just getting started with XSLT and) trying to get an XHTML
> header into my output, like
>
> <?xml version="1.0" encoding="iso-8859-1"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>
> "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.
> dtd">
It goes in your xsl:output instruction. The serializer will generate both the
XML declaration and the document type declaration for you. You don't need to
explicitly create them; you can't because they are not part of the XPath/XSLT
data model (no such thing as a 'doctype node').
<xsl:output method="xml" encoding="iso-8859-1"
doctype-system="http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd"
doctype-pubilc="-//W3C//DTD XHTML 1.0 Strict//EN"/>
- Mike
____________________________________________________________________________
mike j. brown | xml/xslt: http://skew.org/xml/
denver/boulder, colorado, usa | resume: http://skew.org/~mike/resume/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list