Output directory with XT custom engine...
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 4
- Joined: Wed Oct 13, 2010 10:00 pm
Output directory with XT custom engine...
Hello. First time user of oXygen. Am trying to set up a transformation scenario using XT to transform XML into HTML (I'm using XT because it's the multiple document extension in XT that I need). I got it to transform, but the output files always go to the Oxygen application main directory instead of the directory I assign. I assigned the output dir in the Edit Scenario > Output tab, but again, nothing goes there. Any help is appreciated. TIA
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Output directory with XT custom engine...
Hello,
How did you configure XT in Oxygen?
If you have configured it as a custom XSLT engine(Options -> Preferences -> XML -> XSLT-FO-XQuery -> Custom Engines), make sure you also specify the output(result) argument in its command line: ${out}
e.g.
java -cp xp.jar;xt20051206.jar com.jclark.xsl.sax.Driver ${xml} ${xsl} ${out}
Another way of configuring XT in Oxygen is via the JAXP API.
1. Copy the XT jar(xt20051206.jar) to the lib folder from the Oxygen installation folder and restart Oxygen.
2. In Options -> Preferences -> XML -> XSLT-FO-XQuery -> XSLT, JAXP XSLT Transformer, in the Value field use: com.jclark.xsl.trax.TransformerFactoryImpl
Then, in the transformation scenario(Document -> Transformation -> Configure Transformation Scenario, Edit) you can select JAXP from the Transformer combo and XT will be used.
PS: Multiple documents can also be generated with XSLT 2.0(and Saxon-HE/PE/EE) via xsl:result-document.
Regards,
Adrian
How did you configure XT in Oxygen?
If you have configured it as a custom XSLT engine(Options -> Preferences -> XML -> XSLT-FO-XQuery -> Custom Engines), make sure you also specify the output(result) argument in its command line: ${out}
e.g.
java -cp xp.jar;xt20051206.jar com.jclark.xsl.sax.Driver ${xml} ${xsl} ${out}
Another way of configuring XT in Oxygen is via the JAXP API.
1. Copy the XT jar(xt20051206.jar) to the lib folder from the Oxygen installation folder and restart Oxygen.
2. In Options -> Preferences -> XML -> XSLT-FO-XQuery -> XSLT, JAXP XSLT Transformer, in the Value field use: com.jclark.xsl.trax.TransformerFactoryImpl
Then, in the transformation scenario(Document -> Transformation -> Configure Transformation Scenario, Edit) you can select JAXP from the Transformer combo and XT will be used.
PS: Multiple documents can also be generated with XSLT 2.0(and Saxon-HE/PE/EE) via xsl:result-document.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Wed Oct 13, 2010 10:00 pm
Re: Output directory with XT custom engine...
Thanks for the reply and config info, Adrian. I have tried configuring it both ways that you have demonstrated. However, the problem persists; the output goes into the oXygen application folder. I have set a working folder in the Custom Engine congif, but nothing ever goes there, either. Where is the ${out} variable assigned? I tried the output tab when transforming using JAXP, but again, nothing happens. In fact, it wants me to choose a file and now a folder. Thanks.
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Output directory with XT custom engine...
It's probably generating the output in the current folder(whichever that may be). This means there's still something wrong in the command line configuration.
Did you use ${out} as the third argument after the Java class name(Driver)?
Also, use quotes to make sure the arguments don't get mixed up when they contain space:
e.g.
java -cp xp.jar;xt20051206.jar com.jclark.xsl.sax.Driver "${xml}" "${xsl}" "${out}"
The ${out} variable is replaced with the file path specified in the "Save as" field from Edit Scenario -> Output tab. Make sure you specify a filename and there(not a folder). e.g. /path/to/my/file/result.xml
If that field is empty a temporary file is used.
Regards,
Adrian
Did you use ${out} as the third argument after the Java class name(Driver)?
Also, use quotes to make sure the arguments don't get mixed up when they contain space:
e.g.
java -cp xp.jar;xt20051206.jar com.jclark.xsl.sax.Driver "${xml}" "${xsl}" "${out}"
The ${out} variable is replaced with the file path specified in the "Save as" field from Edit Scenario -> Output tab. Make sure you specify a filename and there(not a folder). e.g. /path/to/my/file/result.xml
If that field is empty a temporary file is used.
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 4
- Joined: Wed Oct 13, 2010 10:00 pm
Re: Output directory with XT custom engine...
Hello again Adrian. I was able to get the custom engine working with the following line:
java -cp "C:\XP\xp.jar";"C:\xt-20051206\lib\xt20051206.jar" com.jclark.xsl.sax.Driver ${xml} ${xsl} "\\server0010\Applications\training\test.htm"
I think the biggest problem was I was missing the -cp after the java. I also had to setup a 'dummy' html file called 'test.htm' as the target. If I tried to use the index.htm file that is part of my generated file list, it ended up writing it incorrectly. I will probably move away from XT in the near future. Thanks again for you help!
java -cp "C:\XP\xp.jar";"C:\xt-20051206\lib\xt20051206.jar" com.jclark.xsl.sax.Driver ${xml} ${xsl} "\\server0010\Applications\training\test.htm"
I think the biggest problem was I was missing the -cp after the java. I also had to setup a 'dummy' html file called 'test.htm' as the target. If I tried to use the index.htm file that is part of my generated file list, it ended up writing it incorrectly. I will probably move away from XT in the near future. Thanks again for you help!
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Output directory with XT custom engine...
You should replace "\\server0010\Applications\training\test.htm" with ${out} to allow the transformation scenario to specify the output.
Regards,
Adrian
Regards,
Adrian
Adrian Buza
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
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