[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 13:21:01 -0400
xalan dtd path
xsl list wrote:
> 
> ><xsl:value-of select="$DTD_PATH" />

This prints out the value of the DTD_PATH parameter.

> I need to validate the xml, hence, am adding the <!DOCTYPE ... > to all my
> xml files and ruuning xalan as such:
> xalan -in file.xml -validate

> Can I make the dtd path variable so I would not have to edit all the files
> if it changes?

To pass a variable from the command line into a stylesheet you need
to have this at the top of your stylesheet.

<xsl:param name="DTD_PATH" select="']['" />

I've included a ridiculous default value, which makes it possible to
check if no parameter was received, and crash out if this is the case.

Then on the command line:

xalan -in file.xml -validate -param DTD_PATH '../dtds'

As long as the DTD_PATH parameter is specifed, it will override the
default value (][).

-- 
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.