correction:
<filename><xsl:value-of select="normalize-space(.)"/></filename>
On Mon, Jan 18, 2010 at 2:48 PM, Israel Viente
<israel(_dot_)viente(_at_)gmail(_dot_)com> wrote:
I think you can try the following:
In the batch file:
dir *.html /B > html.txt
In the xsl file something like that:
<xsl:variable name="fileStr" select="unparsed-text('html.txt','UTF-8')"/>
<xsl:variable name="tokenizedFiles" select="tokenize($fileStr,'
')"/>
<xsl:for-each select="$tokenizedFiles">
<xsl:if test="not(position() = last())">
<filename>normalize-space(.)</filename>
</xsl:if>
</xsl:for-each>
Israel
On Mon, Jan 18, 2010 at 2:26 PM, Byomokesh Sahoo
<sahoo(_dot_)byomokesh(_at_)gmail(_dot_)com> wrote:
Hi,
I am facing problem to run my XSL in command prompt. I want get all
file name (from one directory) to write a new xml file.
Example.
d:\byomokesh\
1.html
2.html
3.html
My XSL
<xsl:template match="/">
<filename><xsl:value-of select="tokenize(document-uri(.),
'/')[last()]"/></filename>
</xsl:template>
Neet Output
new.xml
<filename>1.html</filename>
<filename>2.html</filename>
<filename>3.html</filename>
But i am confuse how i will run in command prompt to get right ouput.
I am using Saxon9-2-0-3j
Thanks
Byomokesh
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--