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

Re: Command Line

Subject: Re: Command Line
From: Israel Viente <israel.viente@xxxxxxxxx>
Date: Mon, 18 Jan 2010 14:48:41 +0200
Re:  Command Line
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,'&#xD;')"/>
<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.byomokesh@xxxxxxxxx> 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

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.