RE: xt:mkdir

Subject: RE: xt:mkdir
From: Mike Brown <mbrown@xxxxxxxxxxxxx>
Date: Wed, 17 Nov 1999 11:33:50 -0700
G. Ken Holman wrote:
> BTW, looking at http://www.jclark.com/xml/xt.html I don't see
> documentation for a function called "mkdir" ... where does
> one find the details for this

and Brian Smith wrote:
> O.k.  I'll bite where is the mkdir function (and any others 
> documented)?

Heck, I'm not a Java programmer, but I know this one. It's documented the
URL above, though not explicitly.

"Extension Functions

A call to a function ns:foo where ns is bound to a namespace of the form
http://www.jclark.com/xt/java/className is treated as a call of the static
method foo of the class with fully-qualified name className."

In other words, you have access to the methods of any Java class in the
CLASSPATH known to the Java instance that's running XT. mkdir() is one such
method that is in the standard java.io.File class.


xt:mkdir has been mentioned on the list twice before, so none of you have
any excuse for not having heard about xt:mkdir before now! (I'm kidding)

In response to my query about multiple output documents, James Tauber posted
an example on July 14:
http://www.mulberrytech.com/xsl/xsl-list/archive/msg05544.html ... and then
on Sept 2, I asked about this very issue:
http://www.mulberrytech.com/xsl/xsl-list/archive/msg06666.html

In response, I received the following advice from James Clark on how to use
what gets returned by the mkdir function in a variable:

"In XT's current implementation, the definition of a result tree fragment
valued variable is evaluated lazily once each time the variable is
referenced. So if a definition of a result tree fragment valued variable has
side-effects, make sure you reference that variable exactly once."

-Mike


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread