Re: [xslt] applying xsltproc to all files in a directory



Hi !

I didn't know there were a basename command !
the basename ant tasks returns an error telling that it can't be used in a <for>, so I couldn't use it when iterating over my files.
I'm trying to use an exec and the basename linux command and am on the way to succeed, thank you for the trick !

Marie.

Rush Manbert a écrit :
Marie Sauvage - EBM WebSourcing wrote:
  
Hi !

I'm a little new in xslt transformation and uses xsltproc.
I'm trying to apply an xslt transformation to all html files contained in a 
directory and writting the ouput in another directory.
Is it possible to do it ?
xsltproc seems to don't take *.html, nor a directory in input. As I work with 
ant, I tried with it to do a <for> on each file of the source directory and to 
use the -o param on xsltproc to output files in the directory I want but without 
success :

    # xsltproc -o ./target/site/doc/
    ./src/site/stylesheets/petals-doc-integrated.xsl ./src/site/doc/index.html
    I/O error : Is a directory

Do you know if this is possible with xsltproc ? Do you have an idea of how to do 
it ?

My problem is that I'm not able do get the file name with ant to pass it to 
xsltproc, I only get the complete absolute path, so I can pass it in input file 
but not in output.

thanks in advance for your help,
Marie.
    

Hi Marie,

Can you use basename to get the filename from the path?

man basename

- Rush

_______________________________________________
xslt mailing list, project page http://xmlsoft.org/XSLT/
xslt gnome org
http://mail.gnome.org/mailman/listinfo/xslt



=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Scanned with Copfilter Version 0.83beta3a (P3Scan 2.2.1)
AntiSpam:  SpamAssassin 3.1.4
by Markus Madlener @ http://www.copfilter.org

  


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]