Ant task to transform all files in a folder
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 190
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Ant task to transform all files in a folder
Post by martindholmes »
I'm having trouble getting a fairly simple Ant task to work. I'm trying to run an XSLT transformation on all the files in a folder and output the results to another folder. This is what the relevant bit of the build file looks like at the moment:
I get this output in the console, but nothing is created:
According to how I read the Ant docs, this should scan the included directory (anthology) and process all of the files in it.
Can anyone see what I'm missing?
Code: Select all
<target name="poemsToHTML">
<echo>Create output for all poems in the anthology folder.</echo>
<xslt force="true" style="${pd}/xsl/poem.xsl" includes="${pd}/anthology" basedir="${pd}/xsl" destdir="${pd}/html" extension=".html" scanincludeddirectories="true">
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
<classpath location="${oxygenlib}/saxon9ee.jar"/>
</xslt>
</target>
Code: Select all
poemsToHTML:
[echo]Create output for all poems in the anthology folder.
[xslt] Transforming into /media/Data/mholmes/Documents/english/VictorianPoetryNetwork/svnrepo/html
Can anyone see what I'm missing?
-
- Posts: 190
- Joined: Wed Apr 20, 2005 5:43 pm
- Location: Victoria, BC, Canada
Re: Ant task to transform all files in a folder
Post by martindholmes »
Answering my own question, in case it helps someone else. I had to use a fileset:
Code: Select all
<fileset id="anthologyFiles" dir="${pd}/anthology" includes="*.xml"></fileset>
<xslt force="true" style="${pd}/xsl/poem.xsl" destdir="${pd}/html" extension=".html" useImplicitFileset="false">
<fileset refid="anthologyFiles"/>
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
<classpath location="${oxygenlib}/saxon9ee.jar"/>
</xslt>
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service