RE: problems with xt:mkdir

Subject: RE: problems with xt:mkdir
From: "Richard Lander" <rlander@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Nov 1999 14:02:55 -0500
 Dave,

No problem, this PR-compliant XSLT SS should work with any XML document,
even against itself.

> type mkdir.xsl

<?xml version='1.0' standalone='no'?>
<!DOCTYPE xsl:stylesheet [
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
		xmlns:xtfile="http://www.jclark.com/xt/java/java.io.File";
		version="1.0"
                xmlns:xt="http://www.jclark.com/xt";
                extension-element-prefixes="xt">

<xsl:param name="filepath" select="'Output/'"/>


<xsl:output method="xml" indent="yes"/>

<xsl:template match='/'>
  <xsl:comment>
    <xsl:value-of select="xtfile:mkdir(xtfile:new(string($filepath)))"/>
  </xsl:comment>
    <xsl:apply-templates/>
</xsl:template>

</xsl:stylesheet>

try:
xt mkdir.xsl mkdir.xsl
and
xt mkdir.xsl mkdir.xsl filepath=anydir

If you are calling xt from a batch file, you may need to use quotation
marks, as in: "filepath=anydir"

I hope that helps,

Richard.

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of DPawson@xxxxxxxxxxx
Sent: Wednesday, November 17, 1999 3:50 AM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: RE: problems with xt:mkdir


Richard. This is the first time I've seen anyone using this extension.

I wondered if you might put a small, complete example to the list
for the FAQ?


TIA, DaveP




>-----Original Message-----
>From: Richard Lander [mailto:rlander@xxxxxxxxxxxxxxxxxxx]
>Sent: 17 November 1999 04:32
>To: xsl-list@xxxxxxxxxxxxxxxx
>Subject: RE: problems with xt:mkdir
>
>
> Hello,
>
>I have sinced recieved some help from a kind soul. He provided me with:
>
>    <xsl:if
>test="xtfile:mkdir(xtfile:new(string($filepath)))='dummyg'">
>        Can't happen because the function doesn't return strings.
>    </xsl:if>
>
>Thanks to anyone else who was thinking about the problem,
>
>Richard.
>
>-----Original Message-----
>From: owner-xsl-list@xxxxxxxxxxxxxxxx
>[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Richard Lander
>Sent: Tuesday, November 16, 1999 8:41 PM
>To: xsl-list@xxxxxxxxxxxxxxxx
>Subject: problems with xt:mkdir
>
>
> Hello,
>
>I successfully attempted to get XT to create a directory that
>is stored in a
>variable. My problem is with the way by which XT (most recent version)
>creates the directory. I am using:
>
><xsl:value-of select="xtfile:mkdir(xtfile:new(string($filepath)))"/>
>
><xsl:value-of creates the directory without any difficulty,
>but it reports
>back on its success (true |false) , as you might guess. Well,
>I'd like a way
>of creating the directory without recieving the report. I tried
>xsl:apply-templates and xsl:for-each, but neither of them
>worked. Is there
>any other XSL construct that will work?
>
>It isn't that big of a deal, as it doesn't really cause me any problems
>currently, but I would like to find a solution.
>
>Thanks,
>
>Richard.
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 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