|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: variable dtd path
Yasser El-Zein wrote:
>
> I need not to hard code the full path of my dtd file. This does not work:
> <!DOCTYPE tldoc SYSTYM "{$DTD_PATH}/tldoc.dtd"/>
> where {$DTD_PATH} is an enviroment, or command line, variable. Is there a
> work around?
The XML documents produced by XSLT processors are supposedly well-formed
XML external general parsed entities, and as such don't need DOCTYPE
declarations. You can force one to be generated by using the doctype-*
attributes on the <xsl:output> element (see Section 16.1), but as you
pointed out, you can't put variables in these attributes.
So you have to result to a hack:
<xsl:text disable-output-escaping="yes"><!DOCTYPE tldoc SYSTEM "</xsl;text>
<xsl:value-of select="$DTD_PATH" />
<xsl:text disable-output-escaping="yes">/tldoc.dtd"></xsl:text>
Note that the DOCTYPE declaration is not an element, so you shouldn't have
that trailing slash before the end of the declaration.
--
Warren Hedley
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








