Set environment XML_CATALOG_FILES for xsltproc utility
Oxygen general issues.
-
- Posts: 11
- Joined: Tue Jan 14, 2014 6:29 pm
Set environment XML_CATALOG_FILES for xsltproc utility
Hi,
I am using oxygen for Docbook. Is there a way by which i can use my xsltproc utility instead of in-built xsltproc of oxygen like the way we do for FOP utility. The reason behind this is that i want to set the environment XML_CATALOG_FILES for xsltproc which is needed by my customized docbook stylesheet.
Thanks,
Anmol
I am using oxygen for Docbook. Is there a way by which i can use my xsltproc utility instead of in-built xsltproc of oxygen like the way we do for FOP utility. The reason behind this is that i want to set the environment XML_CATALOG_FILES for xsltproc which is needed by my customized docbook stylesheet.
Thanks,
Anmol
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: Set environment XML_CATALOG_FILES for xsltproc utility
Hello,
Oxygen offers the possibility to configure and use custom engines for your XSLT and XQuery transformations.
Please note those engines won't be available for the Debugging mode.
To configure a custom engine, you should go into oXygen menu Options > Preferences > XML > XSLT/FO/XQuery > Custom Engines and add a new engine of the "XSLT" type and properly set the rest of the configuration fields.
You can find more details about the options to be set in the Custom Engines Preferences page in our User-Guide.
Of course, in order to distinguish your own XSLT engine from the default one in oXygen, you should make sure you give it a proper, different name.
Also, make sure that you configure the "Command line" option correctly, so that the value you should have under that filed should look something like:
Regards,
Costin
Oxygen offers the possibility to configure and use custom engines for your XSLT and XQuery transformations.
Please note those engines won't be available for the Debugging mode.
To configure a custom engine, you should go into oXygen menu Options > Preferences > XML > XSLT/FO/XQuery > Custom Engines and add a new engine of the "XSLT" type and properly set the rest of the configuration fields.
You can find more details about the options to be set in the Custom Engines Preferences page in our User-Guide.
Of course, in order to distinguish your own XSLT engine from the default one in oXygen, you should make sure you give it a proper, different name.
Also, make sure that you configure the "Command line" option correctly, so that the value you should have under that filed should look something like:
Code: Select all
"oxygen_installation_dir_goes_here\xsltproc.exe" -o "${out}" "${xsl}" "${xml}"
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 11
- Joined: Tue Jan 14, 2014 6:29 pm
Re: Set environment XML_CATALOG_FILES for xsltproc utility
Hi,
I have a doubt regarding the custom setting.
So, i need to set the environment first and then issue the xsltproc command.
It like this:
export XML_CATALOG_FILES=/doc/tools/catalog.xml
/usr/bin/xsltproc -o {$out} {$xsl} {$xml}
Can I issue these two commands together like in some scripts we issue two commands by using && operator.
Also, i have one more doubt, i.e., how do i define which is the ${xml} and which is the ${xsl}. Does it pick it up automatically when i generate the pdf and specify the stylesheet and the xml file or do i need to specify it somewhere else.
Thanks,
Anmol
I have a doubt regarding the custom setting.
So, i need to set the environment first and then issue the xsltproc command.
It like this:
export XML_CATALOG_FILES=/doc/tools/catalog.xml
/usr/bin/xsltproc -o {$out} {$xsl} {$xml}
Can I issue these two commands together like in some scripts we issue two commands by using && operator.
Also, i have one more doubt, i.e., how do i define which is the ${xml} and which is the ${xsl}. Does it pick it up automatically when i generate the pdf and specify the stylesheet and the xml file or do i need to specify it somewhere else.
Thanks,
Anmol
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Set environment XML_CATALOG_FILES for xsltproc utility
Hi,
No, you can only issue one command in the Command line field, so you'll have to write a script and run that, if you want multiple commands.
You can pass the arguments to the script (note that the quotes are not trivial if you have spaces or Unicode characters in paths):
/bin/sh runxsltproc.sh -o "{$out}" "{$xsl}" "{$xml}"
Then, in the script (runxsltproc.sh) you can simply forward all arguments to xsltproc:
Regards,
Adrian
No, you can only issue one command in the Command line field, so you'll have to write a script and run that, if you want multiple commands.
You can pass the arguments to the script (note that the quotes are not trivial if you have spaces or Unicode characters in paths):
/bin/sh runxsltproc.sh -o "{$out}" "{$xsl}" "{$xml}"
Then, in the script (runxsltproc.sh) you can simply forward all arguments to xsltproc:
Code: Select all
export XML_CATALOG_FILES=/doc/tools/catalog.xml
/usr/bin/xsltproc "$@"
${xml} and ${xsl} are predefined editor variables that Oxygen expands at run time, when you run the transformation with this XSLT engine. All you have to do is use these in the command line in the right place as arguments.Also, i have one more doubt, i.e., how do i define which is the ${xml} and which is the ${xsl}. Does it pick it up automatically when i generate the pdf and specify the stylesheet and the xml file or do i need to specify it somewhere else.
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: 11
- Joined: Tue Jan 14, 2014 6:29 pm
Re: Set environment XML_CATALOG_FILES for xsltproc utility
Hi,
i tried following the steps mentioned below, but i couldn't generate the PDF. The xsltproc was giving waning regarding setting up parameters of xsltproc and that it can't parse {$xsl}
These are the messages that i am getting:
System ID: /SCRATCH/anmolg/j2014.06_pd/src/pd_doc/stylesheets/fo/docbook.xsl
Scenario: PD_DocBook PDF
XML file: /remote/in11pd5-scratch/anmolg/j2014.06_pd/src/pd_doc/Docbook_Template/Docbook_Example/en-US/Docbook_Chap_1.xml
XSL file: /SCRATCH/anmolg/j2014.06_pd/src/pd_doc/stylesheets/fo/docbook.xsl
Engine name: pd_xsltproc
Severity: warning
Description: pd_xsltprocXSLT parameters for custom engines are not set
Scenario: PD_DocBook PDF
XML file: /remote/in11pd5-scratch/anmolg/j2014.06_pd/src/pd_doc/Docbook_Template/Docbook_Example/en-US/Docbook_Chap_1.xml
XSL file: /SCRATCH/anmolg/j2014.06_pd/src/pd_doc/stylesheets/fo/docbook.xsl
Engine name: pd_xsltproc
Severity: warning
Description: warning: failed to load external entity "{$xsl}"
Scenario: PD_DocBook PDF
XML file: /remote/in11pd5-scratch/anmolg/j2014.06_pd/src/pd_doc/Docbook_Template/Docbook_Example/en-US/Docbook_Chap_1.xml
XSL file: /SCRATCH/anmolg/j2014.06_pd/src/pd_doc/stylesheets/fo/docbook.xsl
Engine name: pd_xsltproc
Severity: warning
Description: cannot parse {$xsl}
System ID: /SCRATCH/anmolg/j2014.06_pd/src/pd_doc/stylesheets/fo/docbook.xsl
Scenario: PD_DocBook PDF
XML file: /remote/in11pd5-scratch/anmolg/j2014.06_pd/src/pd_doc/Docbook_Template/Docbook_Example/en-US/Docbook_Chap_1.xml
XSL file: /SCRATCH/anmolg/j2014.06_pd/src/pd_doc/stylesheets/fo/docbook.xsl
Engine name: pd_xsltproc
Severity: fatal
Description: The transformer process ended with code: 4
I took a screenshot of the oxygen gui also but i could not fine the way to attach it with this mail. P
Regards,
Anmol
i tried following the steps mentioned below, but i couldn't generate the PDF. The xsltproc was giving waning regarding setting up parameters of xsltproc and that it can't parse {$xsl}
These are the messages that i am getting:
System ID: /SCRATCH/anmolg/j2014.06_pd/src/pd_doc/stylesheets/fo/docbook.xsl
Scenario: PD_DocBook PDF
XML file: /remote/in11pd5-scratch/anmolg/j2014.06_pd/src/pd_doc/Docbook_Template/Docbook_Example/en-US/Docbook_Chap_1.xml
XSL file: /SCRATCH/anmolg/j2014.06_pd/src/pd_doc/stylesheets/fo/docbook.xsl
Engine name: pd_xsltproc
Severity: warning
Description: pd_xsltprocXSLT parameters for custom engines are not set
Scenario: PD_DocBook PDF
XML file: /remote/in11pd5-scratch/anmolg/j2014.06_pd/src/pd_doc/Docbook_Template/Docbook_Example/en-US/Docbook_Chap_1.xml
XSL file: /SCRATCH/anmolg/j2014.06_pd/src/pd_doc/stylesheets/fo/docbook.xsl
Engine name: pd_xsltproc
Severity: warning
Description: warning: failed to load external entity "{$xsl}"
Scenario: PD_DocBook PDF
XML file: /remote/in11pd5-scratch/anmolg/j2014.06_pd/src/pd_doc/Docbook_Template/Docbook_Example/en-US/Docbook_Chap_1.xml
XSL file: /SCRATCH/anmolg/j2014.06_pd/src/pd_doc/stylesheets/fo/docbook.xsl
Engine name: pd_xsltproc
Severity: warning
Description: cannot parse {$xsl}
System ID: /SCRATCH/anmolg/j2014.06_pd/src/pd_doc/stylesheets/fo/docbook.xsl
Scenario: PD_DocBook PDF
XML file: /remote/in11pd5-scratch/anmolg/j2014.06_pd/src/pd_doc/Docbook_Template/Docbook_Example/en-US/Docbook_Chap_1.xml
XSL file: /SCRATCH/anmolg/j2014.06_pd/src/pd_doc/stylesheets/fo/docbook.xsl
Engine name: pd_xsltproc
Severity: fatal
Description: The transformer process ended with code: 4
I took a screenshot of the oxygen gui also but i could not fine the way to attach it with this mail. P
Regards,
Anmol
-
- Posts: 2879
- Joined: Tue May 17, 2005 4:01 pm
Re: Set environment XML_CATALOG_FILES for xsltproc utility
Hi,
Please note that the editor variables are wrong, the dollar sign must be placed before the bracket.
So, they should be:
Also note that for custom XSLT engines the XSLT parameters specified in the transformation scenario are not passed onto the engine. You'll have to specify them directly in the custom engine configuration (or in the script).
Regards,
Adrian
Please note that the editor variables are wrong, the dollar sign must be placed before the bracket.
So, they should be:
Code: Select all
-o "${out}" "${xsl}" "${xml}"
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