[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: variable 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
|
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
|