Subject: Re: [xsl] Need example of PARAM in XALAN From: Scott_Boag@xxxxxxxxx Date: Sun, 11 Mar 2001 17:45:56 -0500 |
Given the following xml and xsl: == x01.xml == <doc execution_path="la-la"/> == x01.xsl == <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:param name="execution_path" select="doc/@execution_path" > <xsl:value-of select="doc/@execution_path" /> </xsl:param> <xsl:template match="/"> <out><xsl:value-of select="$execution_path"/></out> </xsl:template> </xsl:stylesheet> If I call from the command line without any -param switch, I get: <?xml version="1.0" encoding="UTF-8"?> <out>la-la</out> For XalanJ2, I can do: E:\xml-xalan\test\tests\conf\x>java -classpath e: \xml-xalan\java\build\xalan.jar ;e:\xml-xerces\java\build\xerces.jar org.apache.xalan.xslt.Process -xsl x01.xsl -in x01.xml -param execution_path "toodles" (notice no equals, and not quote marks, since the param is a string in XalanJ2), in which case I get: <?xml version="1.0" encoding="UTF-8"?> <out>toodles</out> In XalanJ1, the param is an expression (turned out to be a very bad idea), so you add the single quotes: -param execution_path "'toodles'". Xalan specific question should normally be sent to the xalan-dev list. Go to http://xml.apache.org/mail.html to subscribe. -scott "Roshan Sharma" <roshansharma@xxxxxxxxxxx> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Sent by: cc: (bcc: Scott Boag/CAM/Lotus) owner-xsl-list@xxxxxxxxxxxx Subject: [xsl] Need example of PARAM in XALAN rytech.com 03/11/2001 03:02 PM Please respond to xsl-list Could someone please show me how to use -PARAM option in XALAN XSL processor? Thanks _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] How to disable escaping o, Mike Brown | Thread | [xsl] Need example of PARAM in XALA, Roshan Sharma |
Re: [xsl] How to disable escaping o, Uche Ogbuji | Date | [xsl] How to disable escaping of '<, Satish Patil |
Month |