[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: variable dtd path

Subject: Re: variable dtd path
From: Warren Hedley <w.hedley@xxxxxxxxxxxxxx>
Date: Wed, 28 Jun 2000 11:41:53 -0400
xml doctype 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">&lt;!DOCTYPE tldoc SYSTEM "</xsl;text>
<xsl:value-of select="$DTD_PATH" />
<xsl:text disable-output-escaping="yes">/tldoc.dtd"&gt;</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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.