This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: how do I generate a reference to a DTD?
- To: xsl-list at mulberrytech dot com
- Subject: Re: how do I generate a reference to a DTD?
- From: Mike Brown <mike at skew dot org>
- Date: Tue, 5 Sep 2000 17:26:21 -0600 (MDT)
- Reply-To: xsl-list at mulberrytech dot com
hudgins, tom wrote:
> I'm trying to use XSLT (msxml3) to generate a wml file. I need to output a
> line like this
>
> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
> "http://www.wapforum.org/DTD/wml_1.1.xml">
It's not an element; it's a document type *declaration*. It essentially
says "I declare that this document is of type foo", where foo is an
identifier for the document type definition -- the DTD -- that in turn
declares content models and entities for documents of this type.
You do not construct the document type declaration in the result tree in
XSLT; you tell the XSLT processor that you would like it to emit it when
it serializes the result tree. All you have to do is add some attributes
to xsl:output. Consult the Output section of the XSLT spec for details
(don't worry, this section is pretty easily grokked)
http://www.w3.org/TR/xslt#output
Note however that you don't have the option of specifying an internal DTD
subset. Your example doesn't have one, though, so you should be fine.
- Mike
____________________________________________________________________
Mike J. Brown, software engineer at My XML/XSL resources:
webb.net in Denver, Colorado, USA http://www.skew.org/xml/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list