This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: output XHTML header


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]