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

System-property function

Subject: System-property function
From: "Pete Johnston" <P.Johnston@xxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Jul 1999 13:50:48 GMT
dos command for system properties
The discussion on this list a couple of weeks ago about splitting 
output files drew my attention to the (rather useful looking!) 
system-property function. 

I've been experimenting with XT (19990725), but can't seem to get it 
to return the value of a property. I do seem to be able to get at the 
value by using XT's provision for calling the getProperty method of 
java.lang.System directly, so I have a work-around, but I'd like to 
understand what I'm doing wrong with system-property. 

The description in section 14.4 of the WD suggests that the 
argument to system-property needs to be a qualified name, but I'm 
not sure what namespace prefix I should I be giving it.

The following stylesheet (prop.xsl):

<?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="/">

Value from system-property 
<xsl:value-of select="string(system-property('xsl:vendor'))"/>
Value from system-property
<xsl:value-of select="string(system-property('my.prop'))"/> 
Value from java.lang.System 
<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:

Value from system-property James Clark
Value from system-property
Value from java.lang.System xxx

Any guidance appreciated.

Pete Johnston
University of Glasgow


 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.