[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XT: Output current users' login and full name?
[Kai Grossjohann] > Our DTD contains an empty element `doccreator', and I would like the > output to contain the login and full name of the user running XT. I'm > using Makefiles in a Unix environment, so some plumbing can be used. I _think_ you should be able to get at this using the XSLT system-property() function, but I haven't been able to get this to work as I hoped (and didn't get any response to my query here on the subject a couple of weeks ago.) However, using XT, you can call the getProperty method of java.lang.System directly to access properties specified at run time. Something like: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" xmlns:prop="http://www.jclark.com/xt/java/java.lang.System" result-ns=""> <xsl:template match="/"> <xsl:value-of select="prop:get-property('my.prop')"/> </xsl:template> </xsl:stylesheet> when run from the DOS command line with java -Dmy.prop=xxx com.jclark.xsl.sax.Driver prop.xml prop.xsl generates: xxx so if you can put the values you require into properties in whatever procedure invokes XT, then I think you should be in business. Pete Johnston University of Glasgow 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
|