Subject: RE: XSLT Question: Inserting a DOCTYPE decl
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Fri, 10 Dec 1999 08:51:06 -0000
|
> <xsl:text disable-output-escaping="yes"
> ><[CDATA[<!DOCTYPE Numbers SYSTEM "<xsl:value-of
> select="$doctype"/>">]]></xsl:text>
>
> at the top of your root template, I think will
> do the job.
Not quite. Two errors here: the <xsl:value-of> won't be recognized as an
element because it's inside a CDATA section, and in any case, you're not
allowed child elements inside <xsl:text>. Try instead something like:
<xsl:variable name="quote">"</xsl:variable>
<xsl:value-of disable-output-escaping="yes"
select="concat('<!DOCTYPE Numbers SYSTEM ', $quote, $doctype, $quote,
'>')"/>
(not tested)
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|