Re: how do I generate a reference to a DTD?

Subject: Re: how do I generate a reference to a DTD?
From: Mike Brown <mike@xxxxxxxx>
Date: Tue, 5 Sep 2000 17:26:21 -0600 (MDT)
hudgins, tom wrote:
> I'm trying to use XSLT (msxml3) to generate a wml file. I need to output a
> line like this
> "";> 

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)

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: in Denver, Colorado, USA 

 XSL-List info and archive:

Current Thread