Subject: [xsl] Java list extension From: Geurt Lagemaat <lagemaat@xxxxxxxxxxxxxxxxxxxxxxxxx> Date: Tue, 05 Jul 2011 01:24:58 +0200 |
I'm within some serious project boundrys so I'm left with one and only option: copying files with XSLT. Now I solved that a while ago (with help of this list), like:
<xsl:value-of select="java-fc:transferTo($FileChannelIn, 0, $size, $FileChannelOut), java-fc:close($FileChannelIn), java-fc:close($FileChannelOut)"/>
Now I need a way to discover the contents of a directory (files and other directorys). So far I have:
<xsl:variable name="directory" select="java-file:new($sourcefileURI)"/> <xsl:variable name="tst"> <!-- as="class:java.io.File" --> <xsl:value-of select="for $file in java-file:list($directory) return concat($sourcefileURI,$file)"/> </xsl:variable>
<xsl:variable name="fftest" select="tokenize($tst,' ')"/> <xsl:for-each select="$fftest">
Problem is that I converted it to a ordinary string and i do need the collection because I want to find out if a entry is a directory or not, like:
How do I type the $tst var so it behaves like a Java collection and I can use it like a Java File collection. What I want is something like:
<xsl:variable name="dirContents"> <!-- as="class:java.io.File" ??? --> <xsl:value-of select="for $file in java-file:list($directory) return concat($sourcefileURI,$file)"/> </xsl:variable>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] sequence as function para, Fabien Tillier | Thread | Re: [xsl] Java list extension, Andrew Welch |
RE: [xsl] sequence as function para, Fabien Tillier | Date | [xsl] php xslt transformation probl, Birnbaum, David J |
Month |